Home » Categories » Multiple Categories |
Common reasons why your application pool may unexpectedly recycle |
Article Number: 129 | Rating: Unrated | Last Updated: Tue, May 15, 2012 at 10:16 PM
|
If your application crashes, hangs and deadlocks it will cause/require the application pool to recycle in order to be resolved, but sometimes your application pool inexplicably recycles for no obvious reason. This is usually a configuration issue ordue to the fact that you're performing file system operations in the application directory. The following is the most common reasons for an application pool to recycle. Application pool settingsIf you check the properties for the application pool you'll see a number of settings for recycling the application pool. In IIS6 they are:
These settings should be pretty self explanatory, but if you want to read more, please take a look atthis MSDN article
The processModel element of machine.configIf you're running IIS5 or the IIS5 isolation mode you'll have to look at the processModel element. The Properties you should pay the closest attention to are:
memoryLimit The default value of memoryLimit is 60. This value is only of interest if you have fairly little memory on a 32 bit machine. 60 stands for 60% of total system memory. So if you have 1 GB of memory the worker process will automatically restart once it reaches a memory usage of 600 MB. If you have 8 GB, on the other hand, the process would theoretically restart when it reaches 4,8 GB, but since it is a 32 bit process it will never grow that big requestLimit
This setting is "infinite" by default, but if it is set to 5000 for example, then ASP.NET will launch a new worker process once it's served 5000 requests timeout The default timeout is "infinite", but here you can set the lifetime of the worker process. Once the timeout is reached ASP.NET will launch a new worker process, so setting this to "00:05:00" would recycle the application every five minutes. Other propertiesThere are other properties within the processModel element that will cause your application pool to recycle, like responseDeadlockInterval. But these other settings usually depend on something going wrong or being out of the ordinary to trigger. If you have a deadlock then that's your main concern. Changing the responseDeadlockIntervalsetting wouldn't do much to resolve the situation. You'd need to deal with the deadlock itself. Editing and updatingASP.NET 2.0 depends on File Change Notifications (FCN) to see if the application has been updated. Depending on the change the application pool will recycle. If you or your application is adding and removing directories to the application folder, then you will be restarting your application pool every time, so be careful with those temporary files Altering the following files will also trigger an immediate restart of the application pool:
Updating the .aspx files, etc.causing a recompile will eventually trigger a restart of the application pool as well. There is a property of the compilation element under system.web that is called numRecompilesBeforeAppRestart. The default value is 20. This means that after 20 recompiles the application pool will recycle A workaround to the sub-directory issueIf your application really depends on adding and removing sub-directories you can use linkd to create a directory junction. Here's how:
Is recycling the application pool really that bad?You really shouldn't have to recycle the application pool, but if you're dealing with a memory leak in your application and need to buy time to fix it, then by all means recycling the application pool could be a good idea |
Attachments
There are no attachments for this article.
|
Will my Crystal Report XI (Crystal Report 11) work on your server?
Viewed 2499 times since Tue, May 1, 2012
Why do I receive "Server Unavailable" message after Crystal Report configuration?
Viewed 2667 times since Tue, May 1, 2012
How to solve ReportViewer error message: "An error has occurred during report processing. Input string was not in a correct format"
Viewed 7951 times since Tue, Jun 18, 2013
Do you support ASP.NET 5?
Viewed 9827 times since Wed, Feb 17, 2016
How can I publish my website to your server?
Viewed 7451 times since Mon, Apr 30, 2012
I forgot my Help Desk Account password. What should I do?
Viewed 6907 times since Mon, May 7, 2012
Monitoring Tools For Windows
Viewed 685 times since Wed, Jul 13, 2022
Will my Crystal Report X (Crystal Report 10) work on your server?
Viewed 2469 times since Tue, May 1, 2012
How can I activate my Crystal Report?
Viewed 3472 times since Tue, May 1, 2012
My Crystal Report does not work.
Viewed 6149 times since Wed, May 23, 2012
|