Avoid Application Timeout

A

Atul Shukla

Hi,
How can I avoid application timeout? Generally a web application time out is
20 minutes, however, we can define this timeout in web.config to any number
of minutes. After giving 500 minutes of time out which is about little more
than 8 hours, the page expires in less than 2 hours. I am confused here how
to avoid this timeout problem.

I just dont want my page to be expired, should work similar to windows
application.
Possible?

Regards,
Atul
 
M

Michael Nemtsev

Hello Atul,

Set the "0" and the session never timeout.
But this perhaps leads you to the problem with your resources.
Each session takes certain amount of system resources and free then when
timeout, and in your case resources never be releases back

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

AS> Hi,
AS> How can I avoid application timeout? Generally a web application
AS> time out is
AS> 20 minutes, however, we can define this timeout in web.config to any
AS> number
AS> of minutes. After giving 500 minutes of time out which is about
AS> little more
AS> than 8 hours, the page expires in less than 2 hours. I am confused
AS> here how
AS> to avoid this timeout problem.
AS> I just dont want my page to be expired, should work similar to
AS> windows
AS> application.
AS> Possible?
AS> Regards,
AS> Atu
 
A

Aidy

Set the "0" and the session never timeout.

Are you sure about that? Non-expiring sessions on a busy site would bring
it down. The reason long sessions still expire is cos the application is
inactive so gets torn down regardless of your active sessions.
 
M

Michael Nemtsev

Hello Aidy,

Yep, kinda wrong :( Sorry.

Seems that there is no way to have the non-timeout session.
in .NET 2.0 the limited the session by 525,601 minutes (1 year)

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
A> Are you sure about that? Non-expiring sessions on a busy site would
A> bring it down. The reason long sessions still expire is cos the
A> application is inactive so gets torn down regardless of your active
A> sessions.
A>
 
A

Aidy

That's still quite high, near as damn it never expiring.

Michael Nemtsev said:
Hello Aidy,

Yep, kinda wrong :( Sorry.

Seems that there is no way to have the non-timeout session.
in .NET 2.0 the limited the session by 525,601 minutes (1 year)

---
WBR, Michael Nemtsev [.NET/C# MVP]. My blog:
http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
A> Are you sure about that? Non-expiring sessions on a busy site would
A> bring it down. The reason long sessions still expire is cos the
A> application is inactive so gets torn down regardless of your active
A> sessions.
A>
 
A

Atul Shukla

Thanks for input!
So what is the timeout precedence? Whether IIS works as per the settings
defined in the IIS or in web.config? As per my understanding, web.config's
timeout got higher precedence over IIS timeout settings. What do you say?


Aidy said:
That's still quite high, near as damn it never expiring.

Michael Nemtsev said:
Hello Aidy,

Yep, kinda wrong :( Sorry.

Seems that there is no way to have the non-timeout session.
in .NET 2.0 the limited the session by 525,601 minutes (1 year)

---
WBR, Michael Nemtsev [.NET/C# MVP]. My blog:
http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and
we miss it, but that it is too low and we reach it" (c) Michelangelo
Set the "0" and the session never timeout.
A> Are you sure about that? Non-expiring sessions on a busy site would
A> bring it down. The reason long sessions still expire is cos the
A> application is inactive so gets torn down regardless of your active
A> sessions.
A>
 
M

Michael Nemtsev

Hello Atul,

IIS just translate your web.config in GUI representation.

---
WBR, Michael Nemtsev [.NET/C# MVP].
My blog: http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo

AS> Thanks for input!
AS> So what is the timeout precedence? Whether IIS works as per the
AS> settings
AS> defined in the IIS or in web.config? As per my understanding,
AS> web.config's
AS> timeout got higher precedence over IIS timeout settings. What do you
AS> say?
AS> AS>
That's still quite high, near as damn it never expiring.

Hello Aidy,

Yep, kinda wrong :( Sorry.

Seems that there is no way to have the non-timeout session. in .NET
2.0 the limited the session by 525,601 minutes (1 year)

---
WBR, Michael Nemtsev [.NET/C# MVP]. My blog:
http://spaces.live.com/laflour
Team blog: http://devkids.blogspot.com/
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo

Set the "0" and the session never timeout.

A> Are you sure about that? Non-expiring sessions on a busy site
would
A> bring it down. The reason long sessions still expire is cos the
A> application is inactive so gets torn down regardless of your
active
A> sessions.
A>
 
B

bruce barker

there are two timeouts. session timeout and application timeout. if
asp.net is not used for its timeout period, then its shutdown. ou an
bump this up, but recycles ca still happen (say too many inproc sessions).

if you want your page to not timeout, switch to sqlserver session, and
set the session timeout to a couple days (or as long as you want). then
your users will never see lost sessions from recycles. you can even make
the session cookie persistent so that it lasts weeks (handy for a
shopping cart application)

-- bruce (sqlwork.com)
 
A

Atul Shukla

Hi Bruce,

Thanks!

Storing session values in SQL is good idea. I was thinking to avoid using
Session variables in the application. So will store minimum information in
cookies (encrypted form). I am in doubt, thinking that even though if I dont
use Session Variables, would application/browser session expire?
Regards,
Atul
 
A

Atul Shukla

Actually I want to keep the session active for more than 8 hours. So what I
did is that changed the IIS Enable Session Timeout setting to 500 minutes,
also disabled all the checkboxes given in the Recycle Tab for an application
pool. Another check box is on Performance tab named as 'idle timeout', I
disabled it too (though not recommended and planning to put 510 minutes if
idle for more than timeout to release the resources). And it has solved my
problem for the time being.
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,073
Latest member
DarinCeden

Latest Threads

Top