Setup:
Windows Server 2008 Standard
MS SQL Server 2008 Standard (version 10.0.1600.22)
mojoPortal 2.3.1.0 MSSQL
II7 is configured with an integrated pipeline
After a few weeks banging on mojoPortal I finally think I have uncovered a bug. This is highly unusual for me. Usually I find defects in new products much sooner than this.
First I misspelled the web site path in web.config and then the w3wp process terminated with an unhandled exception claiming that the web site could not be found. That happened on the first keepalive request I think.
I fixed the path and everything seemed to be ok for some time, maybe hours. Then the w3wp process was terminated. It restarted normally on the next request and serves evey page perfectly if requested normally without the keepalive thread.
Setting UseAppKeepAlive to false fixed the problem. I have a long idle timeout for my application pool so this is not a serious problem for me. I just wanted to experiment if I could improving the very good response time even further by using this setting.
From the web.config:
<add key="UseAppKeepAlive" value="true" />
<add key="AppKeepAliveUrl" value="http://www.uppbod.net/default.aspx" />
I get this in the IIS log file:
I believe these are the requests from the keepalive thread, which seem to go on OK for a while:
2009-07-05 11:27:46 212.30.206.53 GET /default.aspx - 80 - 212.30.206.53 - 200 0 0 1411
2009-07-05 11:30:16 212.30.206.53 GET /default.aspx - 80 - 212.30.206.53 - 200 0 0 1228
2009-07-05 11:32:46 212.30.206.53 GET /default.aspx - 80 - 212.30.206.53 - 200 0 0 1049
2009-07-05 11:35:16 212.30.206.53 GET /default.aspx - 80 - 212.30.206.53 - 200 0 0 869
2009-07-05 11:37:47 212.30.206.53 GET /default.aspx - 80 - 212.30.206.53 - 200 0 0 1385
2009-07-05 11:40:16 212.30.206.53 GET /default.aspx - 80 - 212.30.206.53 - 200 0 0 1206
2009-07-05 11:42:46 212.30.206.53 GET /default.aspx - 80 - 212.30.206.53 - 200 0 0 1026
2009-07-05 11:45:16 212.30.206.53 GET /default.aspx - 80 - 212.30.206.53 - 200 0 0 842
2009-07-05 11:47:47 212.30.206.53 GET /default.aspx - 80 - 212.30.206.53 - 200 0 0 1363
Until this happens and the w3wp.exe file terminates:
From the Windows Server 2008 Event log:
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/1/ROOT
Process ID: 3308
Exception: System.Net.WebException
Message: The operation has timed out
StackTrace: at System.Net.HttpWebRequest.GetResponse()
at mojoPortal.Business.AppKeepAliveTask.DoKeepAlive()
at mojoPortal.Business.AppKeepAliveTask.RunTask()
at mojoPortal.Business.AppKeepAliveTask.RunTaskOnNewThread(Object threadSleepTask)
at System.Threading._ThreadPoolWaitCallback.WaitCallback_Context(Object state)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallbackInternal(_ThreadPoolWaitCallback tpWaitCallBack)
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback(Object state)