When restarting the php-fpm service on my Linux system, the PHP CGI process takes some time to shut down completely. Until this happens, an attempt to start a new instance of CGI PHP will fail because port 9000 is still held by the terminating process. Access to the site during this time leads to a 502 Gateway error, which I would like to avoid.
How can I restart php-fpm smoothly without getting this error?
php nginx
Neiljiang
source share