Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <blockquote> <p>How can I kill the session without having to go through that?</p> </blockquote> <p>The problem you're having <em>isn't</em> one that will be solved by killing the session.</p> <blockquote> <p>the hang arises from a blocking socket that never gets a message</p> </blockquote> <p>If you're using the default PHP session handler, that means that PHP is holding a lock on that file. No other PHP process is going to be able to manipulate the session as long as that lock exists. </p> <p>You have a few options here. </p> <p>First, consider <a href="http://us2.php.net/manual/en/function.session-set-save-handler.php" rel="nofollow">implementing you own session save routines</a>, which means you'd completely control whether or not there is any sort of lock on the session data. You can simply not include any locking at all, which will permit the running-but-hung PHP script to continue running in peaceful bliss. This is the most complex option.</p> <p>Second, are you sure that the long-running socket script needs to <em>write</em> session data? If not, you can simply end the session early and release the lock by calling <a href="http://us2.php.net/manual/en/function.session-write-close.php" rel="nofollow"><code>session_write_close</code></a>. This will release the lock, though it won't actually end the long-running script when the socket closes.</p> <p>Third, look at using socket timeouts in your long-running script. I'm not sure what exact method you're using to work with sockets here and have very little experience working with them in PHP, so I can't make a specific function recommendation.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload