Application Pool Recycling Causes Session Loss

  • Updated

This article describes the steps needed to help prevent sessions loss due to application pool recycles.

Ektron supports sticky sessions as seen in the min site web.config.

          By default ASP.NET uses cookies to identify which requests belong to a particular session.
          If cookies are not available, a session can be tracked by adding a session identifier to the URL.
          To disable cookies, set sessionState cookieless="true".
<sessionState mode="InProc" stateConnectionString="tcpip=" sqlConnectionString="data source=;Trusted_Connection=yes" cookieless="false" timeout="20" />

For more information on session state please see here.  

Session loss with sticky sessions is a Microsoft limitation as stated in the article below.
PRB: Session Data Is Lost When You Use ASP.NET InProc Session State Mode

Basic recommendations are the following:
1. Sticky sessions
2. If you have multiple servers, update to use the same machine key in IIS as seen here
3. Update to the latest Ektron with CUs  to avoid any known bugs.
4.  Resolve any issues with application pool resets due to errors on the system.  It is by design that app pools will reset with too many errors or certain kinds of errors.  Session will terminate accordingly.