Keep alive terminates w3wp process

This is the place to report bugs and get support. When posting in this forum, please always provide as much detail as possible.

Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum, do not report it as a bug.

This is the place to report bugs and get support

When posting in this forum, please try to provide as many relevant details as possible. Particularly the following:

  • What operating system were you running when the bug appeared?
  • What database platform is your site using?
  • What version of mojoPortal are you running?
  • What version of .NET do you use?
  • What steps are necessary to reproduce the issue? Compare expected results vs actual results.
Please do not report problems with a custom build or custom code in this forum. If you are producing your own build from the source code and have problems or questions, ask in the developer forum.
This thread is closed to new posts. You must sign in to post in the forums.
7/6/2009 11:28:15 AM
Gravatar
Total Posts 34

Keep alive terminates w3wp process

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)

 

7/8/2009 8:57:23 AM
Gravatar
Total Posts 18439

Re: Keep alive terminates w3wp process

In addition to the app pool timeout, there are other settings that typically cause an app pool to recycle at least once a day and this can kill the keep alive task until another request comes in and starts it up again. I am out of town right now but will look into handling that error better when I get a chance. I'm not sure its the app keep alive causing it to terminate the process this error may just coincide with the termination.

Best,

Joe

You must sign in to post in the forums. This thread is closed to new posts.