HI,all
很奇怪,我在启动nginx的时候,它自己会同时启动2个master进程,从PID看,第2个master也是属于第一个master的子进程:
root 10519 1 0 09:58 ? 00:00:00 nginx: master process /opt/app/nginx/sbin/nginx -c /opt/conf/nginx/nginx.conf
nginx 10520 10519 0 09:58 ? 00:00:00 nginx: worker process
nginx 10522 10519 0 09:58 ? 00:00:00 nginx: worker process
nginx 10523 10519 0 09:58 ? 00:00:00 nginx: worker process
nginx 10524 10519 99 09:58 ? 00:03:58 nginx: master process /opt/app/nginx/sbin/nginx -c /opt/conf/nginx/nginx.conf
nginx 10525 10519 0 09:58 ? 00:00:00 nginx: worker process
nginx 10526 10519 0 09:58 ? 00:00:00 nginx: worker process
nginx 10527 10519 0 09:58 ? 00:00:00 nginx: worker process
nginx 10528 10519 0 09:58 ? 00:00:00 nginx: worker process
还有个现象是,启动过大概3分钟后,第2个master自己消失了,说消失也不全对,因为从PID看到,虽然第2个master进程没了,但是PID还在,只是ps显示它已经是一个worker了,消失前第2个master一直占一整颗CPU100%,进程的优先级比其他worker都要高(其他worker是15,它是25),基本全是sys use,用vmstat看上下文并不是很高,在300左右.
占CPU这个问题可能跟服务器有关系,这个服务器一直怀疑问题,但是很诡异,一直无法查到是什么原因,上次一个脚本在上面跑很简单也有这种高负载的情况,之后一窝火重启了硬件,居然奇迹般正常了,百思不得其解.