Question

I was hoping someone could validate my assumptions before I recommend that my client upgrade from a 30/mo to a 80/mo hosting package.

Site: the site is a custom ASP.NET ecommerce site. the shopping carts are stored in the inproc session.

Problem during busy seasons like we are having now, users are frequently losing their shopping carts and their FormsAuthentication Login information.

Solution I wanted to migrate the site to use a SQL Server Session state. My assumptions are that the customers are losing their shopping carts because the InProc sessions are recycling more frequently then their 20 minute timeout, due to load. Will moving the Session to SQL Server or a Session State Server allow customer to store their Shopping Cart Session without the recycle, If so, can once their will I have any issues if I increase the Session timeout to say 40 or 60 minutes

Was it helpful?

Solution

Using the SQL Session state means that sessions should survive a recycle of IIS, (but not a recycle of SQL Server if you use the default script which creates the session database in the tempdb).

There is a script available from the Microsoft website which creates a permanent session state db. I would recommend using that one instead (See here).

So, to basically answer your question. Yes, the SQL Session state will help. You might want to consider also using the out-of-proc state server to test your theory.

Also, as a co-worker has just reminded me, make sure anything you store in the session is marked as serializable before migrating, otherwise you will run into problems.

OTHER TIPS

Could you just add some RAM to the box? That might help and would likely be cheaper and simpler than moving the session to SQL Server. Of course, it would only be a stopgap, but if it saved them $50/mo for a few years it's probably worthwhile.

You might also check the code to see if some other data is left in the session for much longer than necessary.

The assumptions sound reasonable to me. might also want to look at the settings on the AppPool and try to figure out why its recycling. Maybe all you need to do is change those (if you can).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top