We are using the MongoDB session state provider for our Sitecore 8.1 CD instance hosted in Azure web apps.
We are facing an issue with our CD instance where the session keeps expiring within 1–2 minutes. But the form authentication is still active. I.e. the user is still logged in, but can't access the session; therefore, the user can't proceed with page actions, e.g. submit form etc.
Below is our configurations for session and forms:
<sessionState mode="Custom" customProvider="mongo" cookieless="false" timeout="30" sessionIDManagerType="Sitecore.SessionManagement.ConditionalSessionIdManager">
<providers>
<add name="mongo" type="Sitecore.SessionProvider.MongoDB.MongoSessionStateProvider, Sitecore.SessionProvider.MongoDB" sessionType="Standard" connectionStringName="session" pollingInterval="2" compression="true" />
<!-- <add name="mssql" type="Sitecore.SessionProvider.Sql.SqlSessionStateProvider, Sitecore.SessionProvider.Sql" sessionType="Standard" connectionStringName="session" pollingInterval="2" compression="true" /> -->
</providers>
</sessionState>
<authentication mode="Forms">
<forms loginUrl="/login" requireSSL="false" name=".ASPXAUTH" slidingExpiration="true" protection="All" path="/" timeout="120" cookieless="UseCookies" />
</authentication>
Note that we share the same session collection/db between test and uat environments.
If I change the mode to 'InProc', the issue goes away.
As suggested by Dymtro, we stood up separate collections for session and analytics. The issue still persists.
What's the best way to troubleshoot why/how sitecore is identifying real users as bots?
The session time out doesn't occur on our test environment where we haven't implemented this below:
@using Sitecore.Mvc.Analytics.Extensions @Html.Sitecore().VisitorIdentification()