473,320 Members | 1,713 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,320 software developers and data experts.

Concurrent Access to same Session wrt Lock Time-out - what is it?

Hello,

I've been reading that ASP.NET serialises (ie. processes one at a time) HTTP
requests if two simultaneous requests need to access the same session state.
It also makes note that ASP.NET tries to reacquire a lock on the session
state every 1/2 second until the timeout is reached, and then it will
forcibly release the previous users lock and take the lock for itself.

What is this timeout figure?

One of our Session state values is a live object that represents a
connection to an application server (in the future we'll dispense with this
and instantiate-on-demand using a "lightweight" connection, but we can't
right now), and it looks very much like two requests are hitting our
"connection" object simultaneously, resulting in dodgy behaviour, exceptions
etc.

Since ASP.NET is meant to protect us from having to manage this ourself, I'm
wondering what the timeout is (at which point you lose the protection of
ASP.NET).

Even a ballpark figure would be appreciated - seconds, minutes, hours?

Thanks

Kevin
Mar 1 '06 #1
2 2874
DWS
Kevin,
Session is per user can you rephrase your question to take this into account?

Thanks
DWS
"Kevin Frey" wrote:
Hello,

I've been reading that ASP.NET serialises (ie. processes one at a time) HTTP
requests if two simultaneous requests need to access the same session state.
It also makes note that ASP.NET tries to reacquire a lock on the session
state every 1/2 second until the timeout is reached, and then it will
forcibly release the previous users lock and take the lock for itself.

What is this timeout figure?

One of our Session state values is a live object that represents a
connection to an application server (in the future we'll dispense with this
and instantiate-on-demand using a "lightweight" connection, but we can't
right now), and it looks very much like two requests are hitting our
"connection" object simultaneously, resulting in dodgy behaviour, exceptions
etc.

Since ASP.NET is meant to protect us from having to manage this ourself, I'm
wondering what the timeout is (at which point you lose the protection of
ASP.NET).

Even a ballpark figure would be appreciated - seconds, minutes, hours?

Thanks

Kevin

Mar 1 '06 #2
I've found the cause of my problem (unrelated), but for interests sake, I'll
ask the question anyway:

Scenario:

User 1 commences a session with the web server (producing SessionId 1).

They then use "File->New Window" to open a second window. Both windows are
now associated with SessionId = 1.

In the first window the user issues a request for a .aspx page. Assuming the
first page takes several seconds to process; the user immediately then
issues another request in the second window.

At this point the web server is now seeing two requests for the SAME
SessionId. ASP.NET serialises (sequences) the requests so that only one
request runs at a time, because otherwise running both requests
simultaneously might corrupt Session data (depending on what the ASP.NET
page code does).

ASP.NET only waits a certain amount of time for the first request to finish,
before it "takes over" the session lock.

I want to know how long that time is, before ASP.NET will forcibly take over
the lock. The nett result is that on a long-running (?) page, ASP.NET might
in fact allow another request to start before the first one has finished.

I think my original question implied this - because two requests needing to
access the SAME session state implies the same Session Id. But I'm still
interested in the answer.

Thanks

Kevin

"DWS" <DW*@discussions.microsoft.com> wrote in message
news:E3**********************************@microsof t.com...
Kevin,
Session is per user can you rephrase your question to take this into
account?

Thanks
DWS
"Kevin Frey" wrote:
Hello,

I've been reading that ASP.NET serialises (ie. processes one at a time)
HTTP
requests if two simultaneous requests need to access the same session
state.
It also makes note that ASP.NET tries to reacquire a lock on the session
state every 1/2 second until the timeout is reached, and then it will
forcibly release the previous users lock and take the lock for itself.

What is this timeout figure?

One of our Session state values is a live object that represents a
connection to an application server (in the future we'll dispense with
this
and instantiate-on-demand using a "lightweight" connection, but we can't
right now), and it looks very much like two requests are hitting our
"connection" object simultaneously, resulting in dodgy behaviour,
exceptions
etc.

Since ASP.NET is meant to protect us from having to manage this ourself,
I'm
wondering what the timeout is (at which point you lose the protection of
ASP.NET).

Even a ballpark figure would be appreciated - seconds, minutes, hours?

Thanks

Kevin

Mar 2 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Eloff | last post by:
This is not really Python specific, but I know Python programmers are among the best in the world. I have a fair understanding of the concepts involved, enough to realize that I would benefit from...
12
by: CJM | last post by:
I'm setting up some web-based (ASP) reports that query an Access DB. I also want certain people to be able to access and manipulate the database directly. However, if the database is open in...
11
by: Durai | last post by:
Hi All, I tested "concurrent testing" in MySQL. It works fine. But I couldn't do in PostgreSQL 7.3.4 on HPUX IPF. I got deadlock problem. I used the PHP script to update table( one script...
14
by: Sean C. | last post by:
Helpful folks, Most of my previous experience with DB2 was on s390 mainframe systems and the optimizer on this platform always seemed very predictable and consistent. Since moving to a WinNT/UDB...
5
by: PJ | last post by:
I posted a few days ago concerning requests being blocked from a main window after a popup window had initiated a file download. Apparently this has to do with the fact that asp.net or iis...
6
by: mark | last post by:
I have an asp.net ecommerce web application on a remote web server. I'm using an Access database on the back end. I've notice a few strange things. When I mimic an multiple user environment by...
1
by: wekrato | last post by:
Hi! I want to do a comfortable way of importing a file into my system via a webpage. When importing, the following three components run at the same time: - ImportStatus which shows how far the...
5
by: Fabio R. | last post by:
To support a webfarm scenario, I'd like to store a global array (serialized) in a file on a network share. In this array there is a list of pages "locked" by other users so I need to read this...
6
by: John Smith | last post by:
I have a C++ program which appends new text to a file. Multiple instances of this program may run concurrently, hence there is a possiblity that 2 or more instances (say C1 and C2) of this C++...
1
by: sanjupommen | last post by:
I am in the process of exploring the possibility of providing our products on databases other than Oracle.I am able to migrate the data, procedures etc without too much effort (latest version of DB2...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.