unit icon indicating copy to clipboard operation
unit copied to clipboard

Not terminated php process after timeout

Open bashkarev opened this issue 4 years ago • 21 comments

Not terminated php process after timeout,

conf.json

{
  "listeners": {
    "*:9000": {
      "application": "index"
    }
  },
  "applications": {
    "index": {
      "type": "php",
      "user": "www-data",
      "group": "www-data",
      "processes": {
        "max": 10,
        "spare": 1
      },
      "root": "/var/www/html/public",
      "index": "index.php"
    }
  },
  "settings": {
    "http": {
      "idle_timeout": 10,
      "send_timeout": 10
    }
  }
}

index.php

<?php

$stdout = fopen('php://stderr', 'wb');
$i = 0;
while (true) {
    fwrite($stdout, $i . '> connection_status: ' . connection_status() . PHP_EOL);
    sleep(1);
    ++$i;
}

bashkarev avatar Mar 11 '20 23:03 bashkarev