unit
unit copied to clipboard
Not terminated php process after timeout
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;
}