473,574 Members | 18,469 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

System.Data.Sql Client "Timeout expired" causing ASP.net web application to automatically restart.

I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server
that is experiencing strange shutdown problems. We are using ASP.NET v1.1
and our application is written in VB.NET

Here's the scenario:

1. .NET Windows Client on a remote machine makes a web service call to
update tables on a Web Server running SQL Server 2000.
2. The Update is updating about 1000 - 3000 records doing simple update
statements like "Update transactions Set UpdateTime = '08/12/2003 04:30:00
PM' "
3. The SqlClient code is receiving the error message below:

Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
The statement has been terminated. at
System.Data.Sql Client.SqlConne ction.OnError(S qlException exception,
TdsParserState state)
at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, TdsParserState state)
at
System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje c
t stateObj)
at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
bulkCopyHandler , TdsParserStateO bject stateObj)
at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
result)
at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
at
HorizonBoss.Fra mework.DataAcce ss.HZSqlFactory .ExecuteNonQuer y(HZRequest
request) in
C:\projects\dot net\Fish.NET\Ho rizonBoss\Frame work\DataAccess \HZSqlFactory.v b
:line 359
2004-08-12 16:36:13.70 [Thread 9] {Error}
HorizonBoss.Mea lPayLive.Busine ssObjects.Patro ns.Patron.Updat eLatestBalanceI n
formation( DataSet currentBalances ): Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding.
The statement has been terminated.

4. I have all my code wrapped in Try/Catch blocks so I see where I catch the
Exception and write this out to a log file.
5. I have code in the Application_End section of the Global.asax and I see
where a different Thread ID comes along and ends my running application.

2004-08-12 16:35:33.70 [Thread 9] {Verbose}
HorizonBoss.Mea lPayLive.Busine ssObjects.Patro ns.Patron.Updat eLatestBalanceI n
formation( DataSet currentBalances ): SQL to execute: UPDATE
mplPatronBalanc eUpdate SET DateBalanceLast Updated = '8/12/2004 4:35:33 PM'
WHERE PatronID = '0857'
2004-08-12 16:36:13.70 [Thread 9] {Error}
HorizonBoss.Fra mework.DataAcce ss.HZSqlFactory .ExecuteNonQuer y( HZRequest
request ): Timeout expired. The timeout period elapsed prior to completion
of the operation or the server is not responding.
The statement has been terminated. at
System.Data.Sql Client.SqlConne ction.OnError(S qlException exception,
TdsParserState state)
at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, TdsParserState state)
at
System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje c
t stateObj)
at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
bulkCopyHandler , TdsParserStateO bject stateObj)
at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
result)
at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
at
HorizonBoss.Fra mework.DataAcce ss.HZSqlFactory .ExecuteNonQuer y(HZRequest
request) in
C:\projects\dot net\Fish.NET\Ho rizonBoss\Frame work\DataAccess \HZSqlFactory.v b
:line 359
2004-08-12 16:36:13.70 [Thread 9] {Error}
HorizonBoss.Mea lPayLive.Busine ssObjects.Patro ns.Patron.Updat eLatestBalanceI n
formation( DataSet currentBalances ): Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding.
The statement has been terminated.
2004-08-12 16:36:14.09 [Thread 9] {Verbose}
HorizonBoss.Mea lPayLive.Busine ssObjects.Patro ns.Patron.Updat eLatestBalanceI n
formation( DataSet currentBalances ): Closing Database connection.
2004-08-12 16:36:14.09 [Thread 9] {Info}
HorizonBoss.Mea lPayLive.Busine ssObjects.Patro ns.Patron.Updat eLatestBalanceI n
formation( DataSet currentBalances ): FINISH:
2004-08-12 16:36:14.09 [Thread 9] {Info}
HorizonBoss.Mea lPayLive.WebSer vices.MealPayCe ntralWS.SendBal ances( DataSet
currentBalances ): Successfully updated latest Real-Time Balance
Information.
2004-08-12 16:36:14.09 [Thread 9] {Info}
HorizonBoss.Mea lPayLive.WebSer vices.MealPayCe ntralWS.SendBal ances( DataSet
currentBalances ): Finish:
2004-08-12 16:36:14.09 [Thread 9] {Verbose}
HorizonBoss.Mea lPayLive.WebSer vices.MealPayCe ntralWS.SendBal ances( DataSet
currentBalances ): Results = True
2004-08-12 16:36:14.29 [Thread 6] {Warning}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Ap plication_End( Object sender,
EventArgs e ): Web Service application is ending.
2004-08-12 16:36:14.29 [Thread 6] {Warning}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Ap plication_End( Object sender,
EventArgs e ): No Errors caused the shutdown.

You can see from the Above log file where the Application_End s on a
different Thread.

6. I also have code in the Application_Err or section of the global.asax,
but this section of the code never gets hit.

7.. When the next Web Request comes in, I write out a History of all the
reasons why the Web Server last shutdown.

2004-08-12 16:14:30.40 [Thread 9] {Info}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Wr iteProcessInfor mation(
ProcessInfo currentInfo ): ProcessID: 3836StartTime: 8/9/2004 1:51:25
PMStatus: 1ShutdownReason : 0RequestCount: 0PeakMemoryUsag e: 54596Millsecond s
the Worker process has been running: 152Minutes the Worker process has been
running: 23Hours the Worker process has been running: 2
2004-08-12 16:14:30.40 [Thread 9] {Verbose}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Wr iteProcessInfor mationHistory(
): START:
2004-08-12 16:14:30.40 [Thread 9] {Info}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Wr iteProcessInfor mation(
ProcessInfo currentInfo ): ProcessID: 3836StartTime: 8/9/2004 1:51:25
PMStatus: 1ShutdownReason : 0RequestCount: 38PeakMemoryUsa ge:
54596Millsecond s the Worker process has been running: 167Minutes the Worker
process has been running: 23Hours the Worker process has been running: 2
2004-08-12 16:14:30.40 [Thread 9] {Verbose}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Wr iteProcessInfor mationHistory(
): FINISH:

I write down the Shutdown Reason as 0. Which means unknown reason why the
web server shut itself down.

8. My database connection string looks as follows:

server=localhos t;UID=MyUser;PW D=secret;databa se=DatabaseName ;pooling=false; c
onnection reset=false;con nection lifetime=5;min pool size=1;max pool
size=10;connect ion timeout=120

I'm completely stumped as to what can be terminating my web application. I
have verified that I'm not touching the \bin folder of the web application
as I know that this causing web servers to restart themselves.

Any help is greatly appreciated.
Nov 18 '05 #1
2 4569
Chris,
Perhaps it is a setting in the machine.config file. Check under
<system.web> ...
<processModel .. There are many values here that can shutdown the aspnet_wp.

Also it is curious that your connection string sets pooling=false but sets
values used for pooling. I do not know if this would have any effect.

"Chris Langston" wrote:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server
that is experiencing strange shutdown problems. We are using ASP.NET v1.1
and our application is written in VB.NET

Here's the scenario:

1. .NET Windows Client on a remote machine makes a web service call to
update tables on a Web Server running SQL Server 2000.
2. The Update is updating about 1000 - 3000 records doing simple update
statements like "Update transactions Set UpdateTime = '08/12/2003 04:30:00
PM' "
3. The SqlClient code is receiving the error message below:

Timeout expired. The timeout period elapsed prior to completion of the
operation or the server is not responding.
The statement has been terminated. at
System.Data.Sql Client.SqlConne ction.OnError(S qlException exception,
TdsParserState state)
at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, TdsParserState state)
at
System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje c
t stateObj)
at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
bulkCopyHandler , TdsParserStateO bject stateObj)
at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
result)
at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
at
HorizonBoss.Fra mework.DataAcce ss.HZSqlFactory .ExecuteNonQuer y(HZRequest
request) in
C:\projects\dot net\Fish.NET\Ho rizonBoss\Frame work\DataAccess \HZSqlFactory.v b
:line 359
2004-08-12 16:36:13.70 [Thread 9] {Error}
HorizonBoss.Mea lPayLive.Busine ssObjects.Patro ns.Patron.Updat eLatestBalanceI n
formation( DataSet currentBalances ): Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding.
The statement has been terminated.

4. I have all my code wrapped in Try/Catch blocks so I see where I catch the
Exception and write this out to a log file.
5. I have code in the Application_End section of the Global.asax and I see
where a different Thread ID comes along and ends my running application.

2004-08-12 16:35:33.70 [Thread 9] {Verbose}
HorizonBoss.Mea lPayLive.Busine ssObjects.Patro ns.Patron.Updat eLatestBalanceI n
formation( DataSet currentBalances ): SQL to execute: UPDATE
mplPatronBalanc eUpdate SET DateBalanceLast Updated = '8/12/2004 4:35:33 PM'
WHERE PatronID = '0857'
2004-08-12 16:36:13.70 [Thread 9] {Error}
HorizonBoss.Fra mework.DataAcce ss.HZSqlFactory .ExecuteNonQuer y( HZRequest
request ): Timeout expired. The timeout period elapsed prior to completion
of the operation or the server is not responding.
The statement has been terminated. at
System.Data.Sql Client.SqlConne ction.OnError(S qlException exception,
TdsParserState state)
at System.Data.Sql Client.SqlInter nalConnection.O nError(SqlExcep tion
exception, TdsParserState state)
at
System.Data.Sql Client.TdsParse r.ThrowExceptio nAndWarning(Tds ParserStateObje c
t stateObj)
at System.Data.Sql Client.TdsParse r.Run(RunBehavi or runBehavior,
SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleR esultSet
bulkCopyHandler , TdsParserStateO bject stateObj)
at System.Data.Sql Client.SqlComma nd.InternalExec uteNonQuery(DbA syncResult
result)
at System.Data.Sql Client.SqlComma nd.ExecuteNonQu ery()
at
HorizonBoss.Fra mework.DataAcce ss.HZSqlFactory .ExecuteNonQuer y(HZRequest
request) in
C:\projects\dot net\Fish.NET\Ho rizonBoss\Frame work\DataAccess \HZSqlFactory.v b
:line 359
2004-08-12 16:36:13.70 [Thread 9] {Error}
HorizonBoss.Mea lPayLive.Busine ssObjects.Patro ns.Patron.Updat eLatestBalanceI n
formation( DataSet currentBalances ): Timeout expired. The timeout period
elapsed prior to completion of the operation or the server is not
responding.
The statement has been terminated.
2004-08-12 16:36:14.09 [Thread 9] {Verbose}
HorizonBoss.Mea lPayLive.Busine ssObjects.Patro ns.Patron.Updat eLatestBalanceI n
formation( DataSet currentBalances ): Closing Database connection.
2004-08-12 16:36:14.09 [Thread 9] {Info}
HorizonBoss.Mea lPayLive.Busine ssObjects.Patro ns.Patron.Updat eLatestBalanceI n
formation( DataSet currentBalances ): FINISH:
2004-08-12 16:36:14.09 [Thread 9] {Info}
HorizonBoss.Mea lPayLive.WebSer vices.MealPayCe ntralWS.SendBal ances( DataSet
currentBalances ): Successfully updated latest Real-Time Balance
Information.
2004-08-12 16:36:14.09 [Thread 9] {Info}
HorizonBoss.Mea lPayLive.WebSer vices.MealPayCe ntralWS.SendBal ances( DataSet
currentBalances ): Finish:
2004-08-12 16:36:14.09 [Thread 9] {Verbose}
HorizonBoss.Mea lPayLive.WebSer vices.MealPayCe ntralWS.SendBal ances( DataSet
currentBalances ): Results = True
2004-08-12 16:36:14.29 [Thread 6] {Warning}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Ap plication_End( Object sender,
EventArgs e ): Web Service application is ending.
2004-08-12 16:36:14.29 [Thread 6] {Warning}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Ap plication_End( Object sender,
EventArgs e ): No Errors caused the shutdown.

You can see from the Above log file where the Application_End s on a
different Thread.

6. I also have code in the Application_Err or section of the global.asax,
but this section of the code never gets hit.

7.. When the next Web Request comes in, I write out a History of all the
reasons why the Web Server last shutdown.

2004-08-12 16:14:30.40 [Thread 9] {Info}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Wr iteProcessInfor mation(
ProcessInfo currentInfo ): ProcessID: 3836StartTime: 8/9/2004 1:51:25
PMStatus: 1ShutdownReason : 0RequestCount: 0PeakMemoryUsag e: 54596Millsecond s
the Worker process has been running: 152Minutes the Worker process has been
running: 23Hours the Worker process has been running: 2
2004-08-12 16:14:30.40 [Thread 9] {Verbose}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Wr iteProcessInfor mationHistory(
): START:
2004-08-12 16:14:30.40 [Thread 9] {Info}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Wr iteProcessInfor mation(
ProcessInfo currentInfo ): ProcessID: 3836StartTime: 8/9/2004 1:51:25
PMStatus: 1ShutdownReason : 0RequestCount: 38PeakMemoryUsa ge:
54596Millsecond s the Worker process has been running: 167Minutes the Worker
process has been running: 23Hours the Worker process has been running: 2
2004-08-12 16:14:30.40 [Thread 9] {Verbose}
HorizonBoss.Mea lPayLive.WebSer vices.Global.Wr iteProcessInfor mationHistory(
): FINISH:

I write down the Shutdown Reason as 0. Which means unknown reason why the
web server shut itself down.

8. My database connection string looks as follows:

server=localhos t;UID=MyUser;PW D=secret;databa se=DatabaseName ;pooling=false; c
onnection reset=false;con nection lifetime=5;min pool size=1;max pool
size=10;connect ion timeout=120

I'm completely stumped as to what can be terminating my web application. I
have verified that I'm not touching the \bin folder of the web application
as I know that this causing web servers to restart themselves.

Any help is greatly appreciated.

Nov 18 '05 #2
I have looked into the processModel configuration and I do not have
anything setup that would cause it to shutdown.

I discovered from my google research that the asp.net framework will
shutdown the aspnet_wp.exe if it determines that a Dead-Lock condition
has occurred; in this case, I don't see why this exception could be
determined to be a Dead-Lock condition unless the Framework is looking
at certain types of exceptions to detemine a "dead-lock" state.

I have experimented with both connection pooling or and off, but the net
result was the same. Whenever this Timeout exception occurs, so Thread
is coming along and terminating my Web Service.

Chris Langston
CL*******@horiz on-boss.com

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
3231
by: Vance Kessler | last post by:
Yes, yes, I know why are we using Crystal 7 under Windows 2003. Well we have to for now. We had a website that was working just fine under Windows 2000 then we re-staged the boxes upgraded to Windows 2003 and now we are having problems with Crystal 7. The thing is that this works on development machines also running the same version of...
0
1501
by: Sham Yemul | last post by:
Hello, We developed an application that has many data entry forms and data controls in Vb.net and Sql Server2000 as backend. For this application we created connection object on load event of every form. The application runs on Server machine with no errors. We got some errors when the application/.exe run on client node, There is no error...
3
4540
by: Carpe Diem | last post by:
Hello I have an aspx page that loses Session("user") value after a few minutes even after I set <sessionState mode="InProc" cookieless="false" timeout="300"> in web.config and wrote function Session_Start() { Session.Timeout = 3000; } in global.asax
2
2379
by: Nils Magnus Englund | last post by:
Hi, I've made a HttpModule which deals with user authentication. On the first request in a users session, it fetches data from a SQL Server using the following code: using (SqlConnection connection = new SqlConnection(ConfigurationSettings.AppSettings)) {
3
13964
by: Nils Magnus Englund | last post by:
Hi, I've made a HttpModule which deals with user authentication. On the first request in a users session, it fetches data from a SQL Server using the following code: using (SqlConnection connection = new SqlConnection(ConfigurationSettings.AppSettings)) {
1
2154
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET Here's the scenario: 1. .NET Windows Client on a remote machine makes a web service call to update tables on a Web Server running SQL Server...
3
1480
by: Agnes | last post by:
My client said when he got "Timeout Expired", once he press the button. whole applciation is quit. I want to "produce the same error " in my development environment but don't know how to do ? Thanks a lot .
1
5869
by: ahmnasa | last post by:
I have a website that has been running for over 1 year now that has never had these issues. Its running MS SQL Server 2005 Express Edition and IIS6 ASP 3 coded. All running from one server. I am starting to randomly get the following errors: Microsoft OLE DB Provider for SQL Server error '80004005' Timeout expired
1
1251
by: anudu | last post by:
hi all, I am developing a system using asp.net(c#). I am using "left" "top" & "Middle" design in my system. I want to set a time out mechanism. when the user has expired the configured time the user is derected to a tomeout mesassage page. at the moment i am using fillowing code in page load metod in all middle pages. if...
0
7817
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7738
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8119
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6482
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5635
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5322
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3759
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3771
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2254
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.