nginx worker process hang,cpu load 100%

Maxim Dounin mdounin at mdounin.ru
Sun Nov 13 12:35:30 UTC 2011


Hello!

On Sun, Nov 13, 2011 at 07:06:02AM -0500, Long Wan wrote:

> I have faced a trouble with nginx runs as a http revers proxy server,the
> worker process sometimes hanging there, cpu usage up to 100%,it's never
> recovey until i kill the process,below is the detail informations: 

[...]

> trouble:
> [root at host-22 ~]# ps aux|grep -e CPU -e nginx
> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME
> COMMAND
> root       936  0.0  0.0  49328  7572 ?        Ss   Nov11   2:37 nginx:
> master process /usr/local/nginx/sbin/nginx
> www       1130 99.9  0.0  55764 13472 ?        R    Nov11 2664:28 nginx:
> worker process      
> www       1216 99.9  0.0  53668 11092 ?        R    Nov11 2660:23 nginx:
> worker process      
> www      31057  0.0  0.0  50816  8820 ?        S    19:40   0:00 nginx:
> worker process      

[...]

> two nginx worker processes(pid 1130,1216) are hanging. there is nothing
> significant message i can found in error.log or strace (-p 1130|1216).

Please try attaching to a runaway process with gdb and check where 
it loops, i.e. 

gdb /path/to/nginx <pid>
bt
n
... (repeat 'n' several times to see loop)

Maxim Dounin



More information about the nginx mailing list