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.