Page 1 of 2 12 Last
  • Jump to page:
    #1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    23
    Rep Power
    0

    Question [IIS6] Session times out unexpectedly


    I've got a server running IIS6 on Windows Server 2003. I'm running a web app built on classic ASP. My session timeout is set to 240 min (4 hours) in the IIS administration console. People are reporting (and I myself have experienced) that the actual timeout is closer to 10-15 min.

    I do not have any directives changing the seesion timeout on any pages within the webapp.

    Has anyone else had this problem, and if so, how do you solve it?
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Do you reset the timeout in any asp page anywhere?
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    23
    Rep Power
    0
    No, I do not change the session timeout in any page anywhere.
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    23
    Rep Power
    0
    Any other ideas on what would cause sessions on this webserver to time out prematurely like they are?
  8. #5
  9. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    How are you testing? Perhaps the session isn't timing out, something else is going wrong.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    23
    Rep Power
    0
    Well, when session variables suddenly no longer hold their values after a very short period of time, and everything worked fine on the "old" server (which was running IIS 5), I have to assume it has something to do with IIS 6's handling of sessions.
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Oslo, Norway
    Posts
    5
    Rep Power
    0
    Originally Posted by Schadrach
    Well, when session variables suddenly no longer hold their values after a very short period of time, and everything worked fine on the "old" server (which was running IIS 5), I have to assume it has something to do with IIS 6's handling of sessions.
    I have the same problem. I just moved one of our sites from a IIS 5.0 server to a IIS 6.0 server. Sessions time out much faster than the settings we have in IIS.

    If anyone has the solution to this problem, I'd be VERY happy..

    Regards,

    Vidar
  14. #8
  15. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Is your virtual directory structure the same between the servers? When you navigate your browser from one web application to another you can lose session data.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    23
    Rep Power
    0
    It's all in the same web application, with the same directory structure as it was on the previous server.
  18. #10
  19. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    23
    Rep Power
    0
    Anyone else have any ideas on what might be causing this? It would really help me out.
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    23
    Rep Power
    0
    I've got it fixed-ish... What I did was override the server default session timeout by declaring the new timeout in every page. In other words, every time a page loads, Session.Timeout gets set with the real session timeout so that the server default doesn't kick in and drop the sessions.

    It doesn't actually fix the underlying problem, but it does cause the desired effect.
  22. #12
  23. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    I'm glad you got a band-aid anyway, I have no more ideas
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  24. #13
  25. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    23
    Rep Power
    0
    NM, it seemed to fix it, at least the complaints stopped for a couple of days...

    It still sems to be doing it, despite placing "Session.Timeout = 360" in the header that all pages on the site use.

    I don't see why/how it could be getting a different timeout value... They're all complaining about a 20min-ish timeout despite setting the timeout to 6 hours on each page load.
  26. #14
  27. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2004
    Posts
    23
    Rep Power
    0
    OK, I finally found the real culprit, and it isn't part of the website configuration.

    Go to IIS Manager -> Server -> Application Pools -> <The pool your web server runs in> -> Properties

    There you will find configuration settings regarding recycling the processes used in that pool. When the process is recycled, session state is lost. Changing the options/timeouts on this screen will solve the problem I was having.
  28. #15
  29. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,453
    Rep Power
    4539
    Thank you for posting your solution.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
Page 1 of 2 12 Last
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo