nginx worker process is shutting down
访问量: 9707
今天修改完nginx 的配置,重启之后,发现有 3个nginx进程是这样,其他5个左右都是正常的nginx; 看起来跟下图一样: ( today I met a strange case that some of my nginx processes become "is shutting down" status. )
nobody 6246 6241 0 10:51 ? 00:00:00 nginx: worker process nobody 6247 6241 0 10:51 ? 00:00:00 nginx: worker process nobody 6247 6241 0 10:51 ? 00:00:00 nginx: worker process nobody 6248 6241 0 10:51 ? 00:00:00 nginx: worker process nobody 6249 6241 0 10:51 ? 00:00:00 nginx: worker process nobody 7995 10419 0 Jan12 ? 00:20:37 nginx: worker process is shutting down nobody 7995 10419 0 Jan12 ? 00:20:37 nginx: worker process is shutting down nobody 7996 10419 0 Jan12 ? 00:20:11 nginx: worker process is shutting down
经过google, 才知道这是 nginx -s reload之后, nginx 正在平滑的重启。(graceful reboot) 。 等调用对应nginx 的进程结束之后,这个process就会重启了。 (after googling, I found that the root cause is nginx's graceful reboot. the nginx process which shoud be shut down is still responding a request, and it will restart once the current request is done )
果然,大约20分钟后,这些进程都变成了 'worker process' 了。( 20 minutes later, all the nginx worker are rebooted )