Supertext Home
Chief of the System Blog

Recycle worker process IIS 6.0

November 26th, 2007 by

Yesterday we had a customer that could not complete his order, during the checkout. Digging a bit deeper I found out that the IIS Worker Process restarted at exactly the same time.

Log in the Event Viewer:

A worker process with process id of ’7232′ serving application pool ‘DefaultAppPool’ has requested a recycle because the worker process reached its allowed processing time limit.

Doesn’t sound very good, does it? As it turns out, this is default behavior and should protect IIS from Memory Leaks and other bad things in you application.

RecycleWorkerProcess

Luckily you can adjust this setting. In my case it was set to 1740 min (which is about once a day), which is not a very good solution. The problem is, that every time the worker process restarts, you loose all your asp.net session states. Now you have several alternatives:

  • Keep your session state out of process. Either via Session State Service or SQL Server, but both add complexity and are slower.
  • You can the recycle behavior. I’ve set it to restart at 22:00. This is 04:00 in Switzerland. Hopefully all clients in the USA and in Switzerland are done ordering at this time.

Nice would be if the Session State could be transferred from one process to the next, but that is not an option yet.

There is a nice forum post about the IIS 6.0 Recycling Tab:
http://forums.asp.net/t/623320.aspx

And about retaining your session state:
http://www.ondotnet.com/pub/a/dotnet/2003/03/24/sessionstate.html

Lucky for us, the customer actually called and we were able to save this order.



Update:

Same problem with IIS7

Related Posts

  1. File Upload with ASP.NET
  2. Supertext.ch is valid XHTML 1.0 Strict
  3. Unknown server tag ‘asp:ListView’
  4. IIS7: Worker process reached its allowed processing time limit

4 Comments to “Recycle worker process IIS 6.0”

  • Fabian says on November 28th, 2007 at 3:01 pm :

    Great you found the solution for this problem.

  • Paige says on April 10th, 2008 at 11:19 am :

    Nice job, thanks for this info!

  • Carros DF says on May 26th, 2008 at 1:55 pm :

    Nice tip, now I’m recycling every 1:00 AM.

  • IIS7: Worker process reached its allowed processing time limit says on August 4th, 2010 at 6:42 am :

    [...] already posted the solution for this for IIS6. It’s basically the same for IIS [...]

Leave a Reply

  • Topics
  • Archive
  • Subscribe
  • Facebook
  • Twitter