Why does the IIS worker process recycling every 29 hours, why default value of this is so odd
Loading
Why does the IIS worker process recycling every 29 hours, why default value of this is so odd
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Tuhin PaulPosted Mar 11, 2024, 10:56 AM
In IIS, the recycling settings for an application pool, including the recycling interval, can be configured either through the IIS Manager GUI or by modifying the applicationHost.config file directly. you can set the recycling interval to 29 hours using the applicationHost.config file:
In this configuration:
The
section specifies the settings for recycling the worker process. Within, theelement sets the recycling interval to 29 hours using theelement with a value of "29:00:00", where "hh:mm:ss" represents hours, minutes, and seconds.Tuhin PaulPosted Mar 11, 2024, 10:55 AM
code snippet that demonstrates how to change the recycling interval of an application pool
Tuhin PaulPosted Apr 25, 2023, 6:16 AM
The IIS worker process is set to recycle every 29 hours by default to prevent memory leaks and other issues that can arise from long-running worker processes. When a worker process recycles, it releases any resources it was holding onto, which can help prevent problems that might occur if the process continued running indefinitely.
One use case where this default setting is helpful is in hosting web applications that use a lot of memory or have long-running processes. If the worker process were allowed to run indefinitely, it could consume all available memory on the server and cause other applications to fail or become unresponsive. By recycling the process every 29 hours, the server can ensure that resources are being used efficiently and that any potential issues are caught before they become serious problems.
Vishal YelvePosted Apr 25, 2023, 4:53 AM
Hi Abhishek,
Do refer below links
https://www.c-sharpcorner.com/blogs/resolve-iis-a-worker-process-has-requested-a-recycle-issue
https://weblogs.asp.net/owscott/why-is-the-iis-default-app-pool-recycle-set-to-1740-minutes
https://serverfault.com/questions/348493/why-does-the-iis-worker-process-recycle-every-29-hours-and-not-every-24-hours#:~:text=had%20a%20reason-,The%20reason%20that%20IIS6%20recycles%20every%2029%20hours%20by%20default,literally%20needs%20to%20restart%20frequently.
Rajkiran SwainPosted Apr 24, 2023, 12:13 PM
The default value for the IIS worker process recycling interval of 29 hours may seem odd, but there is a reason behind it.
The purpose of recycling the worker process is to help maintain the stability and reliability of the web server. Over time, the worker process can accumulate memory leaks, fragmentation, and other issues that can impact performance and cause errors. Recycling the worker process periodically helps to mitigate these issues and keep the web server running smoothly.
The default recycling interval of 29 hours is intended to strike a balance between the need for periodic recycling and the desire to minimize disruptions to users. By default, IIS will recycle the worker process at a time that is least likely to impact users, typically during low-traffic periods such as the early morning hours.