|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2017-10-25 13:43 UTC] sjon at hortensius dot net
Description: ------------ When fpm receives a USR2 (reload) signal it should reload it's configuration. However, it currently also kills existing connections / and/or refuses to accept new connections for a short period. This results in errors suchs as 'connect() failed (111: Connection refused) while connecting to upstream' in my nginx logs. Executing a reload should be more graceful, not throwing any errors or refusing connections and behave like `nginx -s reload` PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Fri Oct 24 08:00:01 2025 UTC |
I've done some other test for this specific bug and I've discovered more, If i do something like this ----------------------------- <?php $start = time(); sleep(20); echo "Execution time: ".(time()-$start)."s"; ?> and then i reload fpm, the script’s execution will stop immediately reporting the execution time elapsed form the launch of the script and the fpm reload Else if i do something like that: ----------------------------- <?php $start = time(); for($i=0; $i<20; $i++) { sleep(1); } echo "Execution time: ".(time()-$start)."s"; ?> and reload FPM, he won’t be serve any other request for the amount of seconds of the cicle, (20 sec) but will terminate the execution of the script correctly. The most terrifying thing is that if I have this kind of cicle with heavy computation and I launch a reload, all the websites under the pool will be unreachable until the script with the heavy cicle will finish.