Timeout expired - help please!

K

Kevin Davies

Hello,

We are having an issue with our web servers and ASP.NET. We have a website
which is bringing up the error:
Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
This website connects to our SQL 2005 cluster server and a SQL 2000 server
to retrieve its data.

A number of other websites using ASP.NET sit on our web servers and these
appear not to be affected. I have taken a copy of the virtual directory for
this particular site and placed it on my laptop running IIS (Windows XP SP2)
and the website runs fine from here, even remotely.

Now what could be causing this error message on the server? We have 2 web
servers, 1 for live and 1 for development. Both bring the same error up.

Both servers are running Windows 2003 Enterprise Edition SP1 with ASP.NET
Version 2.0.50727. My laptop is running Windows XP SP2 and ASP.NET 2.0.50727.

We have attempted to change the timeout period which doesn’t make any
difference – Does anyone know what is causing this or have any ideas where to
start looking?

I have included the stack trace below – not sure whether this will help.

Many thanks,
Neil Paddock.

Stack Trace:

[SqlException (0x80131904): Timeout expired. The timeout period elapsed
prior to completion of the operation or the server is not responding.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException
exception, Boolean breakConnection) +739123

System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject
stateObj) +188

System.Data.SqlClient.TdsParserStateObject.ReadSniError(TdsParserStateObject
stateObj, UInt32 error) +556
System.Data.SqlClient.TdsParserStateObject.ReadSni(DbAsyncResult
asyncResult, TdsParserStateObject stateObj) +164
System.Data.SqlClient.TdsParserStateObject.ReadPacket(Int32
bytesExpected) +34
System.Data.SqlClient.TdsParser.ConsumePreLoginHandshake(Boolean encrypt,
Boolean trustServerCert, Boolean& marsCapable) +73
System.Data.SqlClient.TdsParser.Connect(ServerInfo serverInfo,
SqlInternalConnectionTds connHandler, Boolean ignoreSniOpenTimeout, Int64
timerExpire, Boolean encrypt, Boolean trustServerCert, Boolean
integratedSecurity, SqlConnection owningObject) +303
System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo
serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64
timerExpire, SqlConnection owningObject) +109
System.Data.SqlClient.SqlInternalConnectionTds.LoginNoFailover(String
host, String newPassword, Boolean redirectedUserInstance, SqlConnection
owningObject, SqlConnectionString connectionOptions, Int64 timerStart) +349

System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection
owningObject, SqlConnectionString connectionOptions, String newPassword,
Boolean redirectedUserInstance) +181

System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity
identity, SqlConnectionString connectionOptions, Object providerInfo, String
newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +170

System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions
options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection
owningConnection) +359

System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection
owningObject) +424
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection
owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection
owningObject) +496
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection
owningConnection) +82
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection
outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset,
DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable,
IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord,
Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior
behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83

System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1770
System.Web.UI.WebControls.Repeater.GetData() +50
System.Web.UI.WebControls.Repeater.CreateControlHierarchy(Boolean
useDataSource) +232
System.Web.UI.WebControls.Repeater.OnDataBinding(EventArgs e) +53
System.Web.UI.WebControls.Repeater.DataBind() +72
System.Web.UI.WebControls.Repeater.EnsureDataBound() +55
System.Web.UI.WebControls.Repeater.OnPreRender(EventArgs e) +12
System.Web.UI.Control.PreRenderRecursiveInternal() +77
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean
includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
 
A

Alex Meleta

Hi Kevin,

Have you tried to use the .CommandTimeout property of the SqlCommand? See
more here (http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlcommand.commandtimeout.aspx).
Seems that you use SqlAdapter, so, it should be not a big deal.

Regards, Alex
[TechBlog] http://devkids.blogspot.com

KD> Hello,
KD>
KD> We are having an issue with our web servers and ASP.NET. We have a
KD> website
KD> which is bringing up the error:
KD> Timeout expired. The timeout period elapsed prior to completion of
KD> the
KD> operation or the server is not responding.
KD> This website connects to our SQL 2005 cluster server and a SQL 2000
KD> server
KD> to retrieve its data.
KD> A number of other websites using ASP.NET sit on our web servers and
KD> these appear not to be affected. I have taken a copy of the virtual
KD> directory for this particular site and placed it on my laptop
KD> running IIS (Windows XP SP2) and the website runs fine from here,
KD> even remotely.
KD>
 
K

Kevin Davies

Thanks for your reply Alex, we are not using sqlcommand in the code behind
file. We are connecting to SQL using the built in Visual Studio (drag and
drop) data source tool.

We have dissected the site to try and find where the problem lies. It would
appear that once we removed the following, the site would work on the servers:

SQL datasources (2 in total, 1 SQL2005 and 1 SQL2000) XML site map
(web.sitemap used through an ASP:Sitemapdatasource)

Could this be an IIS/ASP.NET issue on the servers as the site works
perfectly on an XP PC. I've noticed that XP uses IIS 5.0 and the servers use
IIS 6.0.

Many thanks,

Kevin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top