title: Unexpected Session termination
body: <p>we are experiencing some strange behaviour of users being logged out of our web application.
  We are aware that there are multiple threads about this, and we looked and at many of those but none of those brought us closer to solving this problem.</p>
  <p>A typical situation would be, a user opening our application, browsing to the desired part, start entering new information or altering existing and then saving his work. Just to find that saving does not work anymore because the session has been closed. This behaviour may occur after only a few minutes of working. But then, most of the times, that just works fine. In other cases it will work fine after even 90 minutes of working and saving/submitting then.</p>
  <p>So just to be clear, on the exact same page, exact same PHP Skript random logouts happen after random intervals which are not consistently reproduceable for us.</p>
  <p>There is no programmatic session timer or auto logout implemented.</p>
  <p>What we have checked and tried so far:</p>
  <ul>
  <li>PHP Session are active, session_start() is called appropriately in each script involved.</li>
  <li>There are no session_destroy, session_unset, $_SESSION = &quot;&quot; or similar calls. Even if we would have overlooked those, they would consistently and reproduceabel destroy a session</li>
  <li>php.ini values have been reviewed multiple times, set to</li>
  </ul>
  <pre><code>session.gc_maxlifetime = 7200
  session.cookie_lifetime = 7200
  </code></pre>
  <ul>
  <li><p>implemented an background ajax function calling a PHP script which only purpose is refreshing the current session. The ajax function is called every two minutes. Random logouts still happen.</p>
  </li>
  <li><p>checked web server (apache2) uptime. Maybe there would be some strange apache2 restarts, caused by whatever. But no, server uptime checks out.</p>
  </li>
  </ul>
  <p>Any help on this would be highly appreciated!</p>