title: Is setting session.gc_probability and session.gc_divisor equal to 100% a bad idea?
body: <p><strong>The scenario:</strong></p>
  
  <ul>
  <li>User logs in</li>
  <li>Cookie is set to length of session</li>
  <li>After 1 hour of inactivity I wish to log out the user</li>
  </ul>
  
  <p><strong>How I think I can solve this:</strong></p>
  
  <ul>
  <li>Set the session.gc_maxlifetime to 1 hour (3600)</li>
  <li>Set the session.gc_probability to 1 </li>
  <li>Set the session.gc_divisor to 1</li>
  <li>Therefore having a 100% certainty that garbage collection will occur on any idle session cookies after 1 hour.</li>
  </ul>
  
  <p><strong>My question:</strong></p>
  
  <p>All the posts and documentation I've read has never mentioned setting a gc change of 100%, therefore is it bad to do this? Is there a better way? </p>
  
  <p>It's a symfony app, and long term I would like to do something like this <a href="http://symfony.com/doc/master/components/http_foundation/session_configuration.html#session-meta-data" rel="noreferrer">http://symfony.com/doc/master/components/http_foundation/session_configuration.html#session-meta-data</a> but for now I was hoping to just do something simple with session.gc_*</p>
  
  <p>One post I read implies that having a 100% garbage collection chance is "cost-intensive" <a href="https://stackoverflow.com/questions/520237/how-do-i-expire-a-php-session-after-30-minutes/1270960#1270960">How do I expire a PHP session after 30 minutes?</a> is this true? If so, <em>how</em> cost intensive? </p>
  
  <p>Cheers!</p>