Sample Header Ad - 728x90

nginx stop is not working and nginx is creating new process after killing processes

1 vote
1 answer
5042 views
**nginx version: nginx/1.8.0** I am trying to stop nginx with the following command /etc/init.d/nginx stop, however it is not returning any successful message. Then I tried to view the nginx processes with this command ![pidof nginx ][1] and it returns following pids 58058 58057. ***My first query is why nginx is not stopping?*** Another thing which I tried is to kill the processes, so as above mentioned **PIDs** I tried to remove them by following command kill 58058 & kill 58057, the processes are kill but amazingly new processes created automatically. When I again checked the with the command pidof nginx, this time it returns 2 more new processes 58763 58762. ***My Second query is how these processes are automatically being created?*** I know following query is off topic, however I also want to make changes to the configuration file under sites-available. ***Is there any way the config file changes will be implemented without restarting nginx server?*** (For this reason I am restarting my nginx) as we generally do with nginx.conf file with this command service nginx reload or /etc/init.d/nginx reload. My configurations files with pastebin link are as following 1. /etc/init/nginx.conf 2. /etc/init.d/nginx 3. /etc/nginx/nginx.conf 4. php5/fpm/pool.d/www.conf > root@BS-Web-02:/var/run# cat nginx.pid > 58762 > root@BS-Web-02:/var/run# pidof nginx > 58763 58762 > root@BS-Web-02:/var/run# kill 58762 > root@BS-Web-02:/var/run# pidof nginx > 3809 3808 > root@BS-Web-02:/var/run# cat nginx.pid > 3808 Tried Following Solutions but didn't work 1. Why doesn't stopping the nginx server kill the processes associated with it? 2. Not able to stop nginx server **P.S I am using Varnish on Port 80 and nginx on 8080**
Asked by Sukhjinder Singh (111 rep)
Sep 9, 2015, 05:36 AM
Last activity: Jun 4, 2025, 07:00 PM