Knowledge base
Session variables expire irregulary

This problem usually occur with a free package where several websites are hosted in the same application pool. 

If one of the sites overloads the pool it gets recycled and all hosted sites loose their sessions.

If you have problems with Session object and you are using ASP.Net than it's possible to use out of process session storage.

   It's enable by default, but if you still experience session expiration too early - in your Web.Config file set
      <sessionState mode="StateServer" stateConnectionString="tcpip=" />
   Or remove the <sessionState /> section from Web.Config file. 


   If you still have the problem try to use cookie less session along with the state server like this:

       <sessionState mode="StateServer" stateConnectionString="tcpip=" cookieless=true /> 

   If setting the state server didn't help or you are using ASP or other scripting language  - delete your web site from control panel. Wait for 20 minutes and create it again, this would hopefully put it in another application pool. You may try it several times.

You should also consider purchasing a paid package where sites are hosted in dedicated application pools and therefore much more stable.

© Copyright 2022 Doka management panel