What is the optimal time between running DeleteExpiredSessions. I've just inherited a database for a 3M monthly unique session web app and the DeleteExpiredSessions runs every minute. This seems like massive over kill to me. Opinions?
What is the optimal time between running DeleteExpiredSessions. I've just inherited a database for a 3M monthly unique session web app and the DeleteExpiredSessions runs every minute. This seems like massive over kill to me. Opinions?
There is an improved version of the DeleteExpiredSessions sproc published here: http://support.microsoft.com/kb/973849
I believe the intention of the rewrite was to reduce contention by eliminating the possibility of causing full page locks when deleting sessions as frequently as every minute.
In .NET 4.0, this is the version of the sproc that is created when you make a new ASPState database.
We just ran into the same issue. We bumped it to 5 minutes just to ensure the database stayed small with the amount of data we had in session.
We are looking to make it once or twice a day if no negative performance impact. Will keep you posted.