You just lost your ASP.NET session object and your app restarted? Check the Event Log for the following message:
A worker process with process id of ‘23232’ serving application pool ‘ASP.NET v4.0’ has requested a recycle because the worker process reached its allowed processing time limit.
I’ve already posted the solution for this for IIS6. It’s basically the same for IIS 7.
Go to the Application Pools section of your IIS. Right-click on the right pool and choose Recycling.
Here you can adjust when you want you Application Pool to recycle. No recycling is not really recommended. So either out put in a very high number of requests or you choose fixed time when you assume there are no users on your site.
We decided to just recycle during the night.
What would be nice is to get some kind of notification, so one could save all ASP.NET sessions and then restore them afterwards.
6 Kommentare zu “IIS7: Worker process reached its allowed processing time limit”
[…] Same problem with IIS7 […]
but why the problem happens? we know that the error go away after recycling the app pool. but why we get this error?
This is a setting. Every worker process is being reset after a certain time. This is to avoid memory leaks and things like this I guess.
“save all ASP.NET sessions and then restore them afterwards”
You can use in-database session management for this. You are probably using in-memory sessions hence why session data is lost when app pool recycles.
When app pool recycles the app pool process stops, and memory allocated to that process goes *poof*
@ray: Absolutely. But not everybody wants to setup a DB store for this. Or even has SQL server running.
Thank you for the solution