如题,为啥 nginx.conf 里定义了 worker_processes=1 ,还是有 3 个 worker 进程?百思不得其解
root@lnxaio1:/opt/openresty/nginx/conf# grep worker_processes nginx.conf
worker_processes 1;
root@lnxaio1:/opt/openresty/nginx/conf# ps aux |grep nginx
root 13 0.0 0.0 233480 5972 ? S 18:10 0:00 nginx: master process /opt/openresty/nginx/sbin/nginx -c /opt/openresty/nginx/conf/nginx_background.conf -g daemon off;
root 14 0.0 0.1 549668 8780 ? S 18:10 0:00 nginx: master process /opt/openresty/nginx/sbin/nginx -c /opt/openresty/nginx/conf/nginx.conf -g daemon off;
root 15 0.0 0.0 141972 6296 ? S 18:10 0:00 nginx: master process /opt/openresty/nginx/sbin/nginx -c /opt/openresty/nginx/conf/nginx_console.conf -g daemon off;
nobody 60 0.0 0.0 236412 4284 ? S 18:10 0:00 nginx: worker process
root 63 0.0 0.0 145020 5020 ? S 18:10 0:00 nginx: worker process
root 65 0.1 0.2 570756 23840 ? S 18:10 0:00 nginx: worker process
root 792 0.0 0.0 14524 1008 ? S+ 18:13 0:00 grep --color=auto nginx
提前谢过
root@lnxaio1:/opt/openresty/nginx/conf# grep worker_processes nginx.conf
worker_processes 1;
root@lnxaio1:/opt/openresty/nginx/conf# ps aux |grep nginx
root 13 0.0 0.0 233480 5972 ? S 18:10 0:00 nginx: master process /opt/openresty/nginx/sbin/nginx -c /opt/openresty/nginx/conf/nginx_background.conf -g daemon off;
root 14 0.0 0.1 549668 8780 ? S 18:10 0:00 nginx: master process /opt/openresty/nginx/sbin/nginx -c /opt/openresty/nginx/conf/nginx.conf -g daemon off;
root 15 0.0 0.0 141972 6296 ? S 18:10 0:00 nginx: master process /opt/openresty/nginx/sbin/nginx -c /opt/openresty/nginx/conf/nginx_console.conf -g daemon off;
nobody 60 0.0 0.0 236412 4284 ? S 18:10 0:00 nginx: worker process
root 63 0.0 0.0 145020 5020 ? S 18:10 0:00 nginx: worker process
root 65 0.1 0.2 570756 23840 ? S 18:10 0:00 nginx: worker process
root 792 0.0 0.0 14524 1008 ? S+ 18:13 0:00 grep --color=auto nginx
提前谢过