These are my NGINX processes:
root@ip-192-168-0-12:/etc/nginx/sites-enabled# ps aux | grep nginx
root 4758 0.0 0.0 102208 2780 ? Ss Jul25 0:00 nginx: master process /usr/sbin/nginx
www-data 5585 0.0 0.0 105868 7048 ? S Jul26 18:12 nginx: worker process
www-data 5586 0.0 0.0 105868 6972 ? S Jul26 18:07 nginx: worker process
www-data 5587 0.0 0.0 102208 2444 ? S Jul26 0:07 nginx: cache manager process
root 13190 0.0 0.0 12828 1008 pts/2 S+ 20:13 0:00 grep --color=auto nginx
Now let's stop NGINX:
root@ip-192-168-0-12:/etc/nginx/sites-enabled# service nginx stop
nginx stop/waiting
Let's see if the processes still exist (omg they're still there):
root@ip-192-168-0-12:/etc/nginx/sites-enabled# ps aux | grep nginx
root 4758 0.0 0.0 102208 2780 ? Ss Jul25 0:00 nginx: master process /usr/sbin/nginx
www-data 5585 0.0 0.0 105868 7048 ? S Jul26 18:12 nginx: worker process
www-data 5586 0.0 0.0 105868 6972 ? S Jul26 18:08 nginx: worker process
www-data 5587 0.0 0.0 102208 2444 ? S Jul26 0:07 nginx: cache manager process
root 13230 0.0 0.0 12828 1008 pts/2 S+ 20:16 0:00 grep --color=auto nginx
Then if I run service nginx start
, the grep
command would report exactly the same output - one master process, two workers and a cache manager.
What is happening here? Why cannot I just stop NGINX?