cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ccdesktop
Champion Sweeper
Sometimes when searching I get the following "timeout" error.

Is there a way to extend the timeout?

System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. 
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable)
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable)
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()
--------------------------------------------------------------------------------
System.Data.SqlClient.SqlException: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
at System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable)
at DreamweaverCtrls.DataSet.DoInit()
--------------------------------------------------------------------------------
System.Exception: The DefaultView was requested but no tables yet exist.
at DreamweaverCtrls.DataSet.get_DefaultView()
--------------------------------------------------------------------------------
11 REPLIES 11
Hemoco
Lansweeper Alumni
Please try the following sql script if you are affected by this problem

ALTER PROCEDURE [dbo].[Web40searchuserlogon](@username nvarchar(150),
@userdomain nvarchar(150))
AS SELECT TOP 50 dbo.tblComputers.ComputerUnique, dbo.tblComputers.Computername, lastlogon2.lastlogon, dbo.tblComputers.Domain,
dbo.tblComputers.Description, dbo.Web40OSName.OSname AS OS, dbo.tblComputers.SP
FROM (SELECT Username AS lastuser, Domain AS lastdomain, MAX(logontime) AS lastlogon, Computername
FROM dbo.tblCPlogoninfo
GROUP BY Computername, Username, Domain) lastlogon2 INNER JOIN
dbo.Web40OSName INNER JOIN
dbo.tblComputers ON dbo.Web40OSName.Computername = dbo.tblComputers.Computername ON
lastlogon2.Computername = dbo.tblComputers.Computername
WHERE (lastlogon2.lastuser = @username) AND (lastlogon2.lastdomain = @userdomain)
ORDER BY lastlogon2.lastlogon DESC
GO
ccdesktop
Champion Sweeper
Just did a rebuild - still times out.

Only does it for users - not computers or software etc

Happens even if you click on the user's name when viewing a computer item.

We have about 5000 computers in the database.

Currently running on a VM but with two processors, 2GB RAM

Should also say - SQL is hosted on a seperate server.

So website and service running on the same server.
Hemoco
Lansweeper Alumni
@CCdesktop: how many computers are in the database, what hardware is the database server running?
ccdesktop
Champion Sweeper
Happens for me most often when searching for a user in the search box.

Type in the username (it resolves to the diaply name fine) press enter and then it sits on the main page for ages before eventually "timing out".

This is a brand new install.

I haven't tried the rebuild all indexes - but this I notice occurred as part of the upgrade task.

Should I still do it again?
dteague
Engaged Sweeper III
And I just tried, and the page comes up fine...
Hemoco
Lansweeper Alumni
Make sure you have the latest version of the website, there was a connection polling problem that caused this some versions ago.
dteague
Engaged Sweeper III
Lansweeper wrote:
Make sure you have the latest version of the website, there was a connection polling problem that caused this some versions ago.


I ran the install to 4.0.0.40 when it came out. Is there somethign else I need to do?
Hemoco
Lansweeper Alumni
dteague wrote:

I ran the install to 4.0.0.40 when it came out. Is there somethign else I need to do?

You can try to reorganize all indexes

try this from the sql scripts:

"execute psysrebuildallindexes"
dteague
Engaged Sweeper III
Lansweeper wrote:
You can try to reorganize all indexes

try this from the sql scripts:

"execute psysrebuildallindexes"


Trying this now.