Back to Website
Show / Hide Table of Contents

Eliminating cold start problem

  • 1 minute to read

If there are no HTTP requests for a certain amount of time (the default is 20 minutes), then IIS suspends the application pool. After that, when a new request comes in, a startup delay is observed because the worker process needs to restart the application pool, load the .NET environment, compile and initialize your code, and finally serve the request. This is a so-called cold start.

To avoid the suspension of the Customer's Canvas application pool, perform the following steps:

  1. Install the Application Initialization role. In the Add Roles and Feature Wizard of Windows Server 2012 and higher, select the Application Initialization check box.

    The Application Initialization role.

  2. Enable the Always Running mode. In IIS Manager, right-click the Customer's Canvas application pool, and then click Advanced Settings. Set the Start Mode option to AlwaysRunning and Idle Time-out (minutes) to 0.

    The start mode option.

    In Windows Server 2012, you also need to set Start Automatically to True. Note, this setting was removed in Windows Server 2012 R2.

  3. Enable the auto-start provider and application preload. You can perform this step through the %WINDIR%\System32\inetsrv\config\applicationHost.config file as follows:

    1. Add a <serviceAutoStartProviders> element to the <system.applicationHost> node to register CcAutoStartProvider.

      <serviceAutoStartProviders>
          <add name="CcAutoStartProvider"
               type="Aurigma.DesignEditor.CustomersCanvasInitialization, Aurigma.DesignEditor" />
      </serviceAutoStartProviders>
      
    2. Locate the entry for the Customer's Canvas site under the <sites> node, enable the application preload, and register the auto-start provider for this site.

      <sites>
          <site name="CustomersCanvas" id="1" serverAutoStart="true">
              <application path="/"
                           applicationPool="CustomersCanvas"
                           preloadEnabled="true"
                           serviceAutoStartEnabled="true"
                           serviceAutoStartProvider="CcAutoStartProvider">
              </application>
          </site>
      </sites>
      

After you have done all these changes, type iisreset at the command prompt to restart IIS.

Was this page helpful?
Thanks for your feedback!
Back to top Copyright © 2001–2024 Aurigma, Inc. All rights reserved.
Loading...
    Thank for your vote
    Your opinion is important to us. To provide details, send feedback.
    Send feedback