ignore_user_abort doesn't work?

Discussion in 'Bug Reports' started by xinn, Nov 28, 2007.

  1. xinn

    xinn Member


    i wrote a simply irc-bot in php and it seems that lsws ( or php5.2.4 ) has some problems with ignore_user_abort function. It doesn't actually work... When user clicks "close" button in a browser then he stops a script. I tested the bot on my local environment ( apache 2.0.55, php 5.1.1 ) and it works perfect...

    I use lsws 3.3 ent; php 5.2.4 & suExec
  2. mistwang

    mistwang LiteSpeed Staff

    ignore_user_abort may only work with Apache as Apache embed PHP engine in httpd process. LSWS has no clue whether "ignore_user_about" has been set or not, and the PHP process might be assigned to another request or shutdown.
    We will take a closer look, it may not be possible to make it work properly with lsphp.
  3. xinn

    xinn Member

    is there any possible workaround?
  4. mistwang

    mistwang LiteSpeed Staff

    We will try, but we cannot guarantee that it will work 100% all the time due to the technical difficult.
  5. mistwang

    mistwang LiteSpeed Staff

    ignore_user_abort works well when PHP has been started in self-managed mode, that way, LSWS only start one parent process, that parent process will start children process to serve requests. When a request abort, the children process that handles the request will continue till the request has been finished.

    So, you need to set "PHP_LSAPI_CHILDREN" env greater than "Max Connections" for the lsphp external app, and "Instances" should be set to "1".

Share This Page