Forum Moderators: open

Message Too Old, No Replies

Maximum Number of Sessions?

Does W2003, IIS have a limit?

         

txbakers

4:13 pm on Mar 18, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Lately we're running into a strange issue. Our programs are session based, with a 20 minute Session.Timeout set upon login.

But people have been reporting they have been timedout and logged out randomly. It has happened to me as well.

I can't find documentation on a maximum numb er of open sessions that the OS can handle. Has anyone seen this? Is it in the IIS metadata perhaps?

Baffling me right now.

THANKS.

venti

4:46 pm on Mar 18, 2008 (gmt 0)

10+ Year Member



Check out the application pool that the site in question in using(in the IIS manager). There are several different settings for queue limits, worker processes, etc..

plumsauce

3:55 am on Mar 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member




I would guess that you are running on IIS 6.0

Having made that leap of faith, I agree with venti.

Look at your application pool.

Specifically, you will lose your sessions upon application pool recycling.

Therefore, what you want to do is avoid that recycling.

If your code can take it, turn off all app pool recycling.

If your code can't take it, then you will need to fix the code until it can.

In my mind, the introduction of the app pool recycling and app pools themselves was the wrong thing to do. In effect it is a crutch for unstable web apps that do not deallocate resources properly. That is an application problem and it ought not be the responsibility of IIS to mask it. Such apps should die horrible deaths at random times and force the developer to fix them. To me, the recycling mechanism was a pure rip from apache that would have been better left alone. IIS 5.0 can run well written, feature rich apps 24x7 with absolute reliability. Any problems are problems stemming from bad coding, not IIS itself.

txbakers

1:15 pm on Mar 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Thanks for that advice, I'll try that today. But what should I look for in my code? I'm not familiar at all with App Pool Recycling so I wouldn't know where to look to see if my code can take it.

Other than closing and nullifying objects and connections, what else should I look for?

plumsauce

3:57 pm on Mar 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



First, let me apologise for sounding harsh. It certainly was not directed at your code in particular. I just happen to really despise the idea of recycling apps to disguise poor production code.

You are doing the right things.

What is unknown is the state of GC in your runtime.

What you might try to do is incrementally increase the time between recycles.

That way you get a feel for the behaviour. You also get to correlate losses of session state with the timing of the recycles. You could use the "recycle at" schedule so that you know exactly when the recycle operations should have happened.

txbakers

4:05 pm on Mar 19, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



What is unknown is the state of GC in your runtime.

Thanks again, I didn't think you were harsh at all! I hate lousy code too.

I'm unfamiliar with GC as well.