We are on Sitecore 9.2 using Azure Ad integration and hosted on Azure PaaS. This was a new platform build and deployed recently. Eventually we started experiencing extreme slowness post login. When we were trying to login via Azure AD, post successful authentication Sitecore was taking 5-10 minutes to go to the launchpad and often throwing timeout issues.
We started our investigation from application insights suspecting there are some issues with AD integration where Sitecore is taking more than expected to authorize and authenticate. Looked in to Identity Server and CM logs, Database health, Elastic Pools etc. We dint find anything alarming.
As a last resort we reached out to Sitecore Support and learnt that it is happening due to large number of SC_Ticket records in the Properties table in Core database.
The “SC_TICKET” records corresponding to expired sessions are automatically deleted by Sitecore.Tasks.CleanupAuthenticationTicketsAgent from the Properties table of a database. However, if the agent fails to clean them up, the expired records remain in the Properties table. Large numbers of “SC_TICKET” records can lead to performance degradation of the login process.
Clean Up Properties Table
To clean up the Properties table of a database, proceed as follows:
- Open showconfig.aspx and double-check the required database by searching for “PropertyStoreProvider”, for example:
<PropertyStoreProvider role:require="ContentManagement or ContentDelivery"> <patch:attribute name="defaultStore">web</patch:attribute> </PropertyStoreProvider>
By default, it is the Web database for scaled instance, and the Core database for a Standalone instance.
- Use a query similar to the following, which removes all authentication tickets (a side effect is that all the active sessions also become expired after this):
DELETE FROM [dbo].[Properties]
WHERE [dbo].[Properties].[Key] like '%SC_TICKET%'
We downloaded this patch and installed on Sitecore 9.2.
Please visit this Knowledge Base Article for more details.