-1

In my web application I've set the session-timeout to 3 min. I keep pinging my app server every 30 sec through an ajax call. So Ideally the session should never expire until it is invalidated by logout action.

But its getting expired in no particular pattern.

Any help in finding out the reason for this behavior is very much appreciated.

Rajendra_Prasad
  • 1,300
  • 4
  • 18
  • 36
Sudheendra
  • 29
  • 5
  • The pinging code probably doesn't ping correctly. Where's the code? – JB Nizet Aug 20 '13 at 11:56
  • How do you ping it ? Try logging the session id when your server receives the ping request (i.e. http ajax request) and see if the session id is identical with every request. – Muhammad Gelbana Aug 20 '13 at 11:56
  • It is pinging and thus the call is happening. I've checked it on Firebug/IE developer tool (network). Pinging is done by a JavaScript method calling itself inside setTimeout. @Muhammad Gelbana Also the session ID for all the calls are same – Sudheendra Aug 20 '13 at 13:06
  • Why? Why not set a proper timeout, in hours, and get rid of the pings altogether? What's the purpose here? – user207421 Aug 20 '13 at 22:59
  • @EJP I cannot afford to make that change as its an old legacy application – Sudheendra Aug 21 '13 at 11:36

1 Answers1

0

It could be possible that the session's timeout isn't renewed if the session isn't accessed during the ping request.

roehrijn
  • 1,387
  • 1
  • 11
  • 20