473,394 Members | 1,800 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 2701
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: jing_li | last post by:
Hi, you all, I am a newbee for php and I need your help. One of my coworker and I are both developing a webpage for our project using php. We have a copy of the same files in different location...
3
by: Grinninger | last post by:
Hello, I am using ASP.NET, C# under W2K. I try to keep some important information in application- and session-state Objects. With the recycling of the ASPNet_WP.EXE my application- and...
8
by: Ron Vecchi | last post by:
I know this has been asked before but I out of all the posts I've read regarding using Directory.Move and then the application restarting itself I have found no answer except that Sessions are...
10
by: Anthony Williams | last post by:
Hi gang, This one looks like a bug :o( As you may or may not know, setting session management in web.config to use cookieless sessions causes the ASP.NET runtime to munge a session ID into...
12
by: D. Shane Fowlkes | last post by:
This is a repost (pasted below). Since my original post, I've double checked the system clock and set all IIS Session Timeout values to 10 minutes. Still ...the problem occurs. I've also...
6
by: Daniel Walzenbach | last post by:
Hi, I have a web application which sometimes throws an “out of memory” exception. To get an idea what happens I traced some values using performance monitor and got the following values (for...
9
by: AndersBj | last post by:
Hi all, I have a web application that uses State Server for session handling. The web application randomly loses all session variables. The sessions are not always lost, sometimes I can use the...
2
by: alex.callea | last post by:
Hi there, We have an asp.net (1.0) web application running on a 6 nodes web farm (Network Load balancing windows 2003 iis 6.0) using a sql state server (SQL 2000 running on windows 2003). ...
3
by: AlonR | last post by:
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...
10
by: joeriggs | last post by:
Having trouble with an application which is using SQL Server 2000 to store session state. The App is ASP.NET 2.0 on Win2003. Occasionally all sessions are lost at once, causing the app to break....
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.