Questions tagged [session-timeout]

A session timeout occurs when a unique application session (e.g. a web session) expires due to a time limitation placed on the session.

A session is a way of uniquely identifying an instance of usage of an application. This is often achieved by the assignation of a unique token, which the user must provide each time they invoke an operation within the application. In this way, sessions are one way of overcoming the stateless nature of HTTP requests.

A session may have an arbitrary expiry time associated with it. Once this expiry time has been reached, the session is no longer considered valid. Session expiries can either be fixed or sliding; a fixed expiry indicates a definite point in time at which the session becomes invalid, while a sliding expiry indicates the maximum amount of time between individual requests which is allowed to elapse before the session becomes invalid. In this manner, a sliding expiration may never timeout.

Session timeouts are not errors in themselves; they are valid states of a session which indicate that the session should not be used, and all requests which attempt to use the expired session should be treated as erroneous. However, faults may arise due to sessions timing out before they have expired, or sessions considered valid when they have passed their expiration time.

See also: Session (computer science), Session Management, HTTP Cookies

1287 questions
27
votes
1 answer

Configure different timeouts in gunicorn for different endpoints?

Gunicorn allows configuring a timeout for requests, as demonstrated in their documentation below. This seems to be a global configuration for the entire application. Is it possible to configure different timeouts for different endpoints? Perhaps…
Ben Harrison
  • 2,121
  • 4
  • 24
  • 40
26
votes
10 answers

ASP.NET Push Redirect on Session Timeout

I'm looking for a tutorial, blog entry, or some help on the technique behind websites that automatically push users (ie without a postback) when the session expires. Any help is appreciated
Michael
  • 1,133
  • 3
  • 15
  • 30
25
votes
3 answers

Which one is better, InProc or SQL Server, for Session State mode in asp.net?

I am developing an ASP.NET website. I want to know which one is better in session state mode: InProc or SQL Server? I need to hear about your experiences on this issue. Another question is about cookieless attribute. Is there any security hole in my…
Ali Foroughi
  • 4,540
  • 7
  • 42
  • 66
25
votes
7 answers

How to handle expired session using Spring Security and jQuery?

I'm using Spring Security and jQuery in my application. Main page uses loading content dynamically into tabs via AJAX. And all is OK, however sometimes I've got the login page inside my tab and if I type credentials I will be redirected to the…
viator
  • 1,413
  • 3
  • 14
  • 25
25
votes
5 answers

CakePHP Session Timeout on Inactivity only

So the crux of this question is just how to prevent CakePHP from de-authenticating a session ONLY after a period of inactivity. So, if the user does nothing then I expect CakePHP to log them out after a period of 30 minutes. However, if the user…
Kyle O'Brien
  • 932
  • 1
  • 11
  • 28
23
votes
4 answers

Detect Session Timeout in Ajax Request in Spring MVC

I can't see seem to find a good example/answer on how to send back some data from an ajax request when a session has timed out. It sends back the login page HTML and I want to either send json or a status code I can intercept.
Mike Flynn
  • 22,342
  • 54
  • 182
  • 341
22
votes
2 answers

What is the default session timeout and how to configure it when using the Spring Session with Redis as the backend?

My application currently use Spring Session together with Redis as the backend. I searched into the official documentation for Spring Session but was not able to find what the default session timeout is when using that module. Also I am not sure how…
balteo
  • 23,602
  • 63
  • 219
  • 412
22
votes
5 answers

Yii users being logged out after 15-30 minutes despite session timeouts being set to at least 1 day

I've included the relevent parts of our Yii config file below: return array( ... 'components'=>array( 'session' => array( 'timeout' => 86400, ), 'user'=>array( 'allowAutoLogin' => true, …
Tom Busby
  • 1,319
  • 2
  • 12
  • 25
21
votes
6 answers

Prevent session expired in PHP Session for inactive user

I have a problem with my application: my application has many forms and need about 1 hour to finish this form because the form is dynamic (can add other forms). The problem is: the session of my web server is 24 minutes. When user fill the form,…
dian
  • 507
  • 1
  • 6
  • 15
18
votes
3 answers

Session timeout warning modal using react

I have a requirement to display timeout warning modal after 13 mins of inactivity and end session after 15 mins if user takes no action. I need to achieve this using reactjs. I checked react-timeout at…
abhi
  • 349
  • 2
  • 8
  • 24
18
votes
3 answers

When is Session_End() called in ASP.NET MVC?

I have configured my Web.Config file as follow in a ASP.NET MVC 2 project: And added the following in Global.asax.cs: protected void Session_End(object sender, EventArgs e) { …
Alex B
  • 644
  • 1
  • 9
  • 22
17
votes
2 answers

Is there a way to combine behavior of SESSION_EXPIRE_AT_BROWSER_CLOSE and SESSION_COOKIE_AGE

For security reasons I set SESSION_EXPIRE_AT_BROWSER_CLOSE to true. But, browser-length cookies (cookies that expire as soon as the user closes his or her browser) don't have a expire time, then SESSION_COOKIE_AGE has no effects (Yes, I check it).…
dani herrera
  • 48,760
  • 8
  • 117
  • 177
17
votes
3 answers

How to keep alive a user's session while they are posting on a forum?

I have a site with a session timeout of 15 minutes. On some pages a user occasionally spends longer than 15 minutes filling in a reply. What is the best solution to keep alive the session in this case? I already use JQuery on these pages, so…
Nick
  • 531
  • 2
  • 7
  • 14
17
votes
4 answers

How can you display a session timeout warning that is smart enough to handle multiple open browsers or tabs

I have implemented a session timeout warning using javascript that simply asks the user if they want to extend their session or logout. The problem is that this is for an intranet portal where power users will often have several browser windows or…
Joel
  • 814
  • 2
  • 9
  • 19
17
votes
2 answers

phpMyAdmin - cannot change session expiration time

I know this question has been asked many times on SO website. However, I have read this, this, this, this, this and this, and more. None of them worked. I have also tried to change the session files location and other things I don't remember now. My…
machineaddict
  • 3,216
  • 8
  • 37
  • 61
1
2
3
85 86