Best practice for setting maximum size limits in the ASPState database transaction log

We have an ASP.Net MVC website, 200 users with long sessions. Each user is expected to log in at least 6-8 hours before logging out. The average session for each user is expected to be less than 1MB.

We are using the ASPState database for the session.
We want to limit the maximum size of the transaction log file, which is currently set to 8 GB. Can we do with less? What are the disadvantages associated with this?

Respectfully,

+2


source to share


1 answer


If you set a minimum maximum file size then you run the risk of stopping all activity on your website because if the log fills up and cannot expand, ASPState cannot be written.

I don't know enough about how the ASDState logs activity (it may or may not have much to do with the duration, size, or duration of the session) to know if 8GB is not enough or too much. It looks like you are better off adapting the database recovery model to simple (which will prevent the escape file from growing if the transactions are not very long) or log backups often enough to compensate for the growth / usage between log backups.



Recommended Reading: This blog post, all links in it, and follow up conversation:

http://sqlblog.com/blogs/aaron_bertrand/archive/2009/07/27/oh-the-horror-please-stop-telling-people-they-should-shrink-their-log-files.aspx

+1


source







All Articles