How to keep the state across servers in a farm.
http://www.eggheadcafe.com
Main Topics
Browse All TopicsWe 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?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
How to keep the state across servers in a farm.
http://www.eggheadcafe.com
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?
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/f
This issue seems to be semi-common, and it has impacted us greatly. Unfortunately, we've still not gotten to the root cause. There are many articles posted that regard this issue, with many differing possible causes. We are working through each possible cause, one-by-one, hoping we'll finally identify the culprit. The real frustration is that our solution works great on XP Pro running IIS 5.1. But on Windows 2003 Server running IIS 6.0, our web app. loses state randomly -- sometimes after only a few minutes and sometimes after a couple of hours. We're also having problems with some frames failing to serve up, but then they're fine if the users right-click inside the frames and manually refresh them. This is all perplexing to me since Win '03 Server w/ IIS 6.0 is more robust than XP Pro, supposedly.
The following articles (culled from other postings on EE) have been helpful, but I can't say we've conquered this issue yet. Maybe they'll help you:
http://blogs.msdn.com/davi
http://www.aspplayground.n
http://www.experts-exchang
http://support.microsoft.c
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!
Business Accounts
Answer for Membership
by: ProactivationPosted on 2005-09-19 at 08:41:20ID: 14912849
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.