469,609 Members | 2,142 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

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.Current.Session.IsNewSession 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.Current.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.

Sep 20 '06 #1
3 1463
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.Current.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
ne********@joergjooss.de
Sep 20 '06 #2
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="StateServer" 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
Sep 20 '06 #3
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" <al********@hotmail.comwrote in message
news:11**********************@b28g2000cwb.googlegr oups.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.Current.Session.IsNewSession 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.Current.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.

Sep 23 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

13 posts views Thread by jing_li | last post: by
8 posts views Thread by Ron Vecchi | last post: by
12 posts views Thread by D. Shane Fowlkes | last post: by
6 posts views Thread by Daniel Walzenbach | last post: by
9 posts views Thread by AndersBj | last post: by
3 posts views Thread by AlonR | last post: by
reply views Thread by Solution2021 | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.