title: php is locking a deleted session file
body: <p>Our php app, running under apache, is occaisionally trying to lock a deleted session file, this hangs the apache process and eventually we run out of processes.</p>
  
  <p>The evidence :</p>
  
  <pre><code>strace : flock(89, LOCK_EX                   -----stuck in flock for File Descriptor 89
  </code></pre>
  
  <p>and then :</p>
  
  <p>lsof, for the same process :</p>
  
  <pre><code>httpd 22161 apache 89u ... /var/lib/php/session/sess_mf7svvirg7rbu9l0m5999pm6h4 (deleted)
  </code></pre>
  
  <p>Any ideas as to why this is occurring? And what we could do to prevent it?</p>