Background processes and session timeout

G

Guest

It is my understanding that when a session timeout occurs, the servicing
thread will be terminated by IIS. However, I did a simple test and made a
test page with a single button; when clicked, the button will go into a loop,
making an INSERT into a database; loop length is long.MaxValue. I then set
session timeout to 2 mins in web.config. In session_end (global.asax), I
created a procedure that inserts to a separate log table. I launched the page
and clicked the test button. Approx. after 2 minutes, session timeout is
fired (evidence is insert made to separate log table). However, the button
procedure kept on running and was not terminated (as I would've expected).

The reason I went to all this trouble is that I have a component that can
run for potentially lengthy periods, and I wanted to see the impact of
session timeout on running threads servicing web requests. Is the behavior I
just recorded the way things should really run? Can I depend on this behavior
to be consistent?
 
S

Scott Allen

Jester:

When the session ends there are no servicing threads cleaned up. 99.9%
of the time those threads have moved on to service other requests for
other sessions.
 
G

Guest

Thanks, Scott. I really appreciate it =)

Scott Allen said:
Jester:

When the session ends there are no servicing threads cleaned up. 99.9%
of the time those threads have moved on to service other requests for
other sessions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top