Configure the recycle time

When the site is accessed for the first time and Sitefinity CMS is activated, many operations are carried out before Sitefinity CMS can fully function. For example, configurations are loaded, resources are loaded, most of the modules and data providers are initialized, database connections are established, and object/relational mappings are constructed. In some cases, dynamic types also need to be constructed.

RECOMMENDATION: To improve the overall experience, configure the application pool to recycle the process as less as possible and configure your application to start automatically after recycle. You can configure it to recycle every 24 hours, during the time when the site is least accessed. For more information about how to configure auto start, see

This way, the user who makes the first request after the recycle does not experience slow response because of the initialization. You can set up the recycle periods in the advanced settings of the application pool in the IIS management console. You must also disable recycling for idle time.

Delay application restart 

Keep in mind that, by default, IIS restarts the application pool if the pool is idle for 20 minutes or more. To extend the restart delay:

  1. Launch the IIS Manager.
  2. Select the application pool for the Sitefinity CMS application.
  3. Click on Advanced Settings.
  4. Set the Idle Time-out (minutes) field to a larger value, for example, 240.

Another reason may be that the maximum number of precompilations is reached, which is 50, by default. As a result, ASP.NET automatically restarts the site, so that it recycles the application pool to unload the old version of your precompiled resources to free up memory, as it cannot store the resources infinitely. For example, if you perform publish-intensive operations like using SiteSync to sync changes to more than 50 pages, or alternatively to a template that more than 50 pages are based on, the application restarts.

To increase the maximum number of precompilations, in your project's web.config file, set a larger value of the numRecompilesBeforeAppRestart property in the following code line:
<compilation debug="true" targetFramework="X.X.X" numRecompilesBeforeAppRestart="50"> where X.X.X is the .NET framework of your project. For example 4.7.1 or 4.8

Defining the proper value for your application is a matter of how much memory you can spare. You can experiment and increase the value and monitor your memory consumption.


Increase your Sitefinity skills by signing up for our free trainings. Get Sitefinity-certified at Progress Education Community to boost your credentials.

Get started with Integration Hub | Sitefinity Cloud | Sitefinity SaaS

This free lesson teaches administrators, marketers, and other business professionals how to use the Integration hub service to create automated workflows between Sitefinity and other business systems.

Web Security for Sitefinity Administrators

This free lesson teaches administrators the basics about protecting yor Sitefinity instance and its sites from external threats. Configure HTTPS, SSL, allow lists for trusted sites, and cookie security, among others.

Foundations of Sitefinity ASP.NET Core Development

The free on-demand video course teaches developers how to use Sitefinity .NET Core and leverage its decoupled architecture and new way of coding against the platform.

Was this article helpful?