Link to home
Start Free TrialLog in
Avatar of SweatCoder
SweatCoderFlag for United States of America

asked on

session gets lost sporadically

We have a classic asp web app running on win03/IIS6. The app works correctly on dozens of servers, but when we installed on one customer's hosted server, the session gets lost quite frequently (for all users), about every 5-10 minutes or so.

Session timeout is set to 60 minutes in IIS and is not set any place in the code. Implementations on other servers do not have this problem. Cookies are enabled on client pc's. The session gets lost in various places throughout the app. It's sporadic, not linked to a certain page or a certain user.

I need some pointers as to where I should start looking. How can I troubleshoot this?
Avatar of Proactivation
Proactivation
Flag of United Kingdom of Great Britain and Northern Ireland image

Check of the hosted server uses a web farm (i.e. multiple webservers serving the same web pages).  I think sessions are held in the memory of the webserver used the first time the page is viewed, and can get lost if another server serves the page. Depending on how much data needs to be passed around, cookies or hidden input fields are a better way to go.
How to keep the state across servers in a farm.
http://www.eggheadcafe.com/articles/20021016.asp
Avatar of SweatCoder

ASKER

We're already planning to go to sql-based session management, but for the short term I'd like to resolve this problem. They are not using a farm, it's a single server. This server is dual-processor, but they say they did some tweak to "turn off" the 2nd cpu or something, because we thought that might be the problem. If the 2nd processor/cpu is indeed running, would that screw up session state?

Any other ideas?
I've hosted websites on dual CPU servers before and haven't had this sort of problem on them. It could be worth posting a link to this question in the IIS forum.
I posted a pointer question on IIS section.
You can put a server in single-processor mode for the OS but it's generally the other way around.  You've already installed your OS and the server is not fast enough so you add another processor but it doesn't take advantage of it.  With Windows, you have to tell it to use both.  If the processor is installed prior to OS installation, it will put it in SMP mode (Symmetric MultiProcessing).  I doubt you'll find a Asymmetric MultiProcessing server being used to host a web site but ...

None of this would have anything to do with losing sessions intermittently.
http://www.cpuplanet.com/features/article.php/1456611
ASKER CERTIFIED SOLUTION
Avatar of Xolutionz
Xolutionz

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Xolutionz, thanks for all the info. This issue plagued us and infuriated our customer to the point that I finally had to rewrite our app such that all session data was stored by sql server, and we took IIS completely out of the picture as far as managing session state was concerned. This solution turned out to be glorious, rock-solid and bulletproof. I recommend it to anyone that has experienced this sickening problem.

[you'd think MS could have architected their session state management to be a *bit* more robust!!]
We are thinking along these lines as well.  The kicker is that our sites running XP Pro/IIS 5.0 are working great, so it would be a re-work of our web solution for sake of the few that are running IIS 6.0.  It probably will happen eventually.  My feeling is that Microsoft should patch IIS to address this specific issue, since they're touting Windows 2003 as their robust web server platform.  Anyway, thanks for the points!