views:

153

answers:

1

Hi,

We have ASP.Net MVC Website which has < 200 users with long running sessions. Each user is expected to stay logged in for at least 6-8 hrs before logging out. The average session per user is expected to be less than 1 MB.
We are using the ASPState database to for session.
We want to put a restriction on the maximumm size of the transaction log file which is presently set out to 8 GB. Can we do with lesser? What are the associated pitfalls if any?

Kind regards,

+1  A: 

If you set a low maximum file size then you run the danger of all activity on your web site grinding to a halt, because if the log fills up and can't expand, ASPState cannot be written to.

I don't know enough about the way ASPState logs activity (it may or may not have much at all to do with session length, size, or duration) to know if 8 GB is not enough, or way too much. It sounds like you're better off either adjusting the recovery model of the database to simple (which will prevent runaway file growth, as long as transactions aren't really long), or backing up the log frequently enough to offset the growth / usage in between log backups.

Recommended reading: this blog post, all of the links therein, and the followup conversation:

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

Aaron Bertrand