title: How to keep extending session life when user is active?
body: <p>Let's say there's a site/system with a logged in member area, and users are rarely, but very inconveniently logged out while working with the site/system. </p>
  
  <p>It's doubtfully session expiring, since the user was not idle for very long. And even if they were idle, I added a periodic AJAX request, a so called heartbeat, which updates the sessions' access time, and modified time. I even added a touch($session_file) every time a user clicks something or a heartbeat is called. I tried regenerating session ID as well. Nothing helped. </p>
  
  <p>And unfortunately, so far, I was not able to reproduce the problem locally, because it happens every so often, when there's more requests. Some php.ini parameters:</p>
  
  <pre><code>session.use_cookies = 1
  session.use_only_cookies = 1
  session.cookie_lifetime = 0
  session.gc_probability = 1
  session.gc_divisor = 1500
  session.gc_maxlifetime = 10800
  </code></pre>