Lost sessions issue

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • AlonR

    Lost sessions issue

    Hi,

    We're experiencing random user sessions losses on our web applications,
    and are researching for any useful information which may shed light on
    this problem.


    Environment:
    In our company, we're developing a web product based on ASP.NET 2.0, in
    conjunction with Oracle database over ADO.NET and external COM objects
    running on the server, interacting with the database, and with external
    modules.
    Our servers are Windows Server 2003, running IIS 6.0, with all the
    latest patches and updates provided by Microsoft. Web application on
    the server is a precompiled version of our web solution.


    Users:
    Number of users on the system is currently minor, less than 10
    concurrent users.


    Sessions:
    We use ASP.NET infrastructure for saving data into session variables.
    Our sessionState mode is InProc, and our application sometimes loads
    our sessions with heavy information variables (e.g. grids, DataSets
    etc).


    The problem:
    This problem is completely inconsistent, and has no specific scenario
    steps. Randomly, our sessions disappear.
    HttpContext.Cur rent.Session.Is NewSession becomes true, and all session
    variables are lost. The Session Id is sometimes reset and replaced, and
    sometimes left unchanged.
    We know for sure that this is not a session time-out issue, as sessions
    are lost while they're active. Sometimes users lose their sessions
    right after logging in, and sometimes after a while of using the
    system, sometimes they're not lost at all.

    Our system has a handler for such failure (namely, directing the user
    to the main login page, in order to start a new session), but we need
    to research and find the root cause of this problem.
    The failure occurs on random pages, and in random scenarios. Repeating
    a scenario after a failure usually yields successful results (i.e. the
    failure does not repeat itself).

    Research:
    This gives us the impression that the problem is probably IIS internal,
    and/or depends on very specific status, or a fault in one of our
    modules. We do not know of any specific memory leaks in our product.
    We are not sure that this is an unhandled exception issue, which can be
    resolved by HttpContext.Cur rent.ClearError . Any information about this
    topic would be appreciated as well.
    Also, it's quite unlikely that those session losses are caused by
    configuration files changes, or by changes to the
    environment/recompilation of ASPX files.

    Are there ways to monitor IIS in order to get a better idea about its
    session handling?
    Is there a way to follow a session and know what caused its closure?
    Any hint would be highly appreciated.

    Thank you,
    Alon.

  • Joerg Jooss

    #2
    Re: Lost sessions issue

    Thus wrote alonr,
    Hi,
    >
    We're experiencing random user sessions losses on our web
    applications, and are researching for any useful information which may
    shed light on this problem.
    [...]
    We are not sure that this is an unhandled exception issue, which can
    be
    resolved by HttpContext.Cur rent.ClearError . Any information about this
    topic would be appreciated as well.
    Also, it's quite unlikely that those session losses are caused by
    configuration files changes, or by changes to the
    environment/recompilation of ASPX files.
    Are there ways to monitor IIS in order to get a better idea about its
    session handling?
    Is there a way to follow a session and know what caused its closure?
    Any hint would be highly appreciated.
    It could be an unhandled exception in a background thread. See http://support.microsoft.com/?id=911816
    helps.

    And just to be sure that the worker process doesn't get bounced, monitor
    the total items in Cache using Perfmon. Maybe you have a certain use case
    where you're caching a super sized object graph in session state (which ends
    up being a Cache entry at the end of the day).

    Cheers,
    --
    Joerg Jooss
    news-reply@joergjoos s.de


    Comment

    • Andrew Morton

      #3
      Re: Lost sessions issue

      AlonR wrote:
      We're experiencing random user sessions losses on our web
      applications, and are researching for any useful information which
      may shed light on this problem.
      Try using sessionState mode="StateServ er" in conjunction with the ASP.NET
      State Service service.

      Do you have the Web Garden setting (in application pools) at more than one?
      That would cause it, because successive requests may go to different
      instances which can know nothing about each other unless the state is stored
      out-of-process.

      Andrew


      Comment

      • William LaMartin

        #4
        Re: Lost sessions issue

        Two possible solutions:

        Ask your web host to increase the Virtual memory limit on their application
        pools. I had a similar problem and that solved it.

        Recompilations are triggered by changes to the contents of the
        application's \bin folder and hence a lost of session. Do you have a file
        in the bin folder than is changing?


        "AlonR" <alon_rotem@hot mail.comwrote in message
        news:1158736406 .474477.124400@ b28g2000cwb.goo glegroups.com.. .
        Hi,
        >
        We're experiencing random user sessions losses on our web applications,
        and are researching for any useful information which may shed light on
        this problem.
        >
        >
        Environment:
        In our company, we're developing a web product based on ASP.NET 2.0, in
        conjunction with Oracle database over ADO.NET and external COM objects
        running on the server, interacting with the database, and with external
        modules.
        Our servers are Windows Server 2003, running IIS 6.0, with all the
        latest patches and updates provided by Microsoft. Web application on
        the server is a precompiled version of our web solution.
        >
        >
        Users:
        Number of users on the system is currently minor, less than 10
        concurrent users.
        >
        >
        Sessions:
        We use ASP.NET infrastructure for saving data into session variables.
        Our sessionState mode is InProc, and our application sometimes loads
        our sessions with heavy information variables (e.g. grids, DataSets
        etc).
        >
        >
        The problem:
        This problem is completely inconsistent, and has no specific scenario
        steps. Randomly, our sessions disappear.
        HttpContext.Cur rent.Session.Is NewSession becomes true, and all session
        variables are lost. The Session Id is sometimes reset and replaced, and
        sometimes left unchanged.
        We know for sure that this is not a session time-out issue, as sessions
        are lost while they're active. Sometimes users lose their sessions
        right after logging in, and sometimes after a while of using the
        system, sometimes they're not lost at all.
        >
        Our system has a handler for such failure (namely, directing the user
        to the main login page, in order to start a new session), but we need
        to research and find the root cause of this problem.
        The failure occurs on random pages, and in random scenarios. Repeating
        a scenario after a failure usually yields successful results (i.e. the
        failure does not repeat itself).
        >
        Research:
        This gives us the impression that the problem is probably IIS internal,
        and/or depends on very specific status, or a fault in one of our
        modules. We do not know of any specific memory leaks in our product.
        We are not sure that this is an unhandled exception issue, which can be
        resolved by HttpContext.Cur rent.ClearError . Any information about this
        topic would be appreciated as well.
        Also, it's quite unlikely that those session losses are caused by
        configuration files changes, or by changes to the
        environment/recompilation of ASPX files.
        >
        Are there ways to monitor IIS in order to get a better idea about its
        session handling?
        Is there a way to follow a session and know what caused its closure?
        Any hint would be highly appreciated.
        >
        Thank you,
        Alon.
        >

        Comment

        Working...