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

Multi tool use
Multi tool use

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












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]][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










share|improve this question























  • File /var/run/nginx.pid is exist? Which PID it contains?
    – strangeman
    Sep 9 '15 at 6:17











  • @strangeman I have added the screenshot of the PIDs
    – Sukhjinder Singh
    Sep 9 '15 at 7:36










  • @SukhjinderSingh prefer to Paste terminal contents rather than adding screenshot.
    – Tejas
    Sep 9 '15 at 8:05






  • 1




    @Tejas added as per your request.
    – Sukhjinder Singh
    Sep 9 '15 at 10:34














up vote
0
down vote

favorite












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]][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










share|improve this question























  • File /var/run/nginx.pid is exist? Which PID it contains?
    – strangeman
    Sep 9 '15 at 6:17











  • @strangeman I have added the screenshot of the PIDs
    – Sukhjinder Singh
    Sep 9 '15 at 7:36










  • @SukhjinderSingh prefer to Paste terminal contents rather than adding screenshot.
    – Tejas
    Sep 9 '15 at 8:05






  • 1




    @Tejas added as per your request.
    – Sukhjinder Singh
    Sep 9 '15 at 10:34












up vote
0
down vote

favorite









up vote
0
down vote

favorite











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]][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










share|improve this question















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]][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







networking process services nginx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 13 '17 at 12:36









Community♦

1




1










asked Sep 9 '15 at 5:36









Sukhjinder Singh

1012




1012











  • File /var/run/nginx.pid is exist? Which PID it contains?
    – strangeman
    Sep 9 '15 at 6:17











  • @strangeman I have added the screenshot of the PIDs
    – Sukhjinder Singh
    Sep 9 '15 at 7:36










  • @SukhjinderSingh prefer to Paste terminal contents rather than adding screenshot.
    – Tejas
    Sep 9 '15 at 8:05






  • 1




    @Tejas added as per your request.
    – Sukhjinder Singh
    Sep 9 '15 at 10:34
















  • File /var/run/nginx.pid is exist? Which PID it contains?
    – strangeman
    Sep 9 '15 at 6:17











  • @strangeman I have added the screenshot of the PIDs
    – Sukhjinder Singh
    Sep 9 '15 at 7:36










  • @SukhjinderSingh prefer to Paste terminal contents rather than adding screenshot.
    – Tejas
    Sep 9 '15 at 8:05






  • 1




    @Tejas added as per your request.
    – Sukhjinder Singh
    Sep 9 '15 at 10:34















File /var/run/nginx.pid is exist? Which PID it contains?
– strangeman
Sep 9 '15 at 6:17





File /var/run/nginx.pid is exist? Which PID it contains?
– strangeman
Sep 9 '15 at 6:17













@strangeman I have added the screenshot of the PIDs
– Sukhjinder Singh
Sep 9 '15 at 7:36




@strangeman I have added the screenshot of the PIDs
– Sukhjinder Singh
Sep 9 '15 at 7:36












@SukhjinderSingh prefer to Paste terminal contents rather than adding screenshot.
– Tejas
Sep 9 '15 at 8:05




@SukhjinderSingh prefer to Paste terminal contents rather than adding screenshot.
– Tejas
Sep 9 '15 at 8:05




1




1




@Tejas added as per your request.
– Sukhjinder Singh
Sep 9 '15 at 10:34




@Tejas added as per your request.
– Sukhjinder Singh
Sep 9 '15 at 10:34










1 Answer
1






active

oldest

votes

















up vote
0
down vote













Check monit service for nginx configuration in /etc/monit.d/.



If it doesn't work, please post your data from /var/log/messages.






share|improve this answer






















  • How this will tell me why my nginx not stopping and why it is creating new processes every time I kill them?
    – Sukhjinder Singh
    Sep 9 '15 at 10:35










  • The Monit application uses PID file checks to see if an application is still running or not. That implies that a PID file must be available for an application, otherwise monit cannot guard it. If a daemon does not create a PID file, use a wrapper to create one. wiki.gentoo.org/wiki/…
    – XakRu
    Sep 9 '15 at 10:47










  • if you have monit, configured for nginx - at time when you will stop nginx, monit will start nginx automaticaly.
    – XakRu
    Sep 9 '15 at 10:48










  • Pls, show your /var/log/messages file
    – XakRu
    Sep 9 '15 at 10:49










  • Can please provide any link how to setup monit on Ubuntu 14. Unfortunately the logs are empty this was the reason I need to restart the server after adding access_log on.
    – Sukhjinder Singh
    Sep 9 '15 at 15:54










Your Answer







StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "106"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
convertImagesToLinks: false,
noModals: false,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













 

draft saved


draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f228471%2fnginx-stop-is-not-working-and-nginx-is-creating-new-process-after-killing-proces%23new-answer', 'question_page');

);

Post as a guest






























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
0
down vote













Check monit service for nginx configuration in /etc/monit.d/.



If it doesn't work, please post your data from /var/log/messages.






share|improve this answer






















  • How this will tell me why my nginx not stopping and why it is creating new processes every time I kill them?
    – Sukhjinder Singh
    Sep 9 '15 at 10:35










  • The Monit application uses PID file checks to see if an application is still running or not. That implies that a PID file must be available for an application, otherwise monit cannot guard it. If a daemon does not create a PID file, use a wrapper to create one. wiki.gentoo.org/wiki/…
    – XakRu
    Sep 9 '15 at 10:47










  • if you have monit, configured for nginx - at time when you will stop nginx, monit will start nginx automaticaly.
    – XakRu
    Sep 9 '15 at 10:48










  • Pls, show your /var/log/messages file
    – XakRu
    Sep 9 '15 at 10:49










  • Can please provide any link how to setup monit on Ubuntu 14. Unfortunately the logs are empty this was the reason I need to restart the server after adding access_log on.
    – Sukhjinder Singh
    Sep 9 '15 at 15:54














up vote
0
down vote













Check monit service for nginx configuration in /etc/monit.d/.



If it doesn't work, please post your data from /var/log/messages.






share|improve this answer






















  • How this will tell me why my nginx not stopping and why it is creating new processes every time I kill them?
    – Sukhjinder Singh
    Sep 9 '15 at 10:35










  • The Monit application uses PID file checks to see if an application is still running or not. That implies that a PID file must be available for an application, otherwise monit cannot guard it. If a daemon does not create a PID file, use a wrapper to create one. wiki.gentoo.org/wiki/…
    – XakRu
    Sep 9 '15 at 10:47










  • if you have monit, configured for nginx - at time when you will stop nginx, monit will start nginx automaticaly.
    – XakRu
    Sep 9 '15 at 10:48










  • Pls, show your /var/log/messages file
    – XakRu
    Sep 9 '15 at 10:49










  • Can please provide any link how to setup monit on Ubuntu 14. Unfortunately the logs are empty this was the reason I need to restart the server after adding access_log on.
    – Sukhjinder Singh
    Sep 9 '15 at 15:54












up vote
0
down vote










up vote
0
down vote









Check monit service for nginx configuration in /etc/monit.d/.



If it doesn't work, please post your data from /var/log/messages.






share|improve this answer














Check monit service for nginx configuration in /etc/monit.d/.



If it doesn't work, please post your data from /var/log/messages.







share|improve this answer














share|improve this answer



share|improve this answer








edited Sep 9 '15 at 11:11









G-Man

11.8k92658




11.8k92658










answered Sep 9 '15 at 8:24









XakRu

272




272











  • How this will tell me why my nginx not stopping and why it is creating new processes every time I kill them?
    – Sukhjinder Singh
    Sep 9 '15 at 10:35










  • The Monit application uses PID file checks to see if an application is still running or not. That implies that a PID file must be available for an application, otherwise monit cannot guard it. If a daemon does not create a PID file, use a wrapper to create one. wiki.gentoo.org/wiki/…
    – XakRu
    Sep 9 '15 at 10:47










  • if you have monit, configured for nginx - at time when you will stop nginx, monit will start nginx automaticaly.
    – XakRu
    Sep 9 '15 at 10:48










  • Pls, show your /var/log/messages file
    – XakRu
    Sep 9 '15 at 10:49










  • Can please provide any link how to setup monit on Ubuntu 14. Unfortunately the logs are empty this was the reason I need to restart the server after adding access_log on.
    – Sukhjinder Singh
    Sep 9 '15 at 15:54
















  • How this will tell me why my nginx not stopping and why it is creating new processes every time I kill them?
    – Sukhjinder Singh
    Sep 9 '15 at 10:35










  • The Monit application uses PID file checks to see if an application is still running or not. That implies that a PID file must be available for an application, otherwise monit cannot guard it. If a daemon does not create a PID file, use a wrapper to create one. wiki.gentoo.org/wiki/…
    – XakRu
    Sep 9 '15 at 10:47










  • if you have monit, configured for nginx - at time when you will stop nginx, monit will start nginx automaticaly.
    – XakRu
    Sep 9 '15 at 10:48










  • Pls, show your /var/log/messages file
    – XakRu
    Sep 9 '15 at 10:49










  • Can please provide any link how to setup monit on Ubuntu 14. Unfortunately the logs are empty this was the reason I need to restart the server after adding access_log on.
    – Sukhjinder Singh
    Sep 9 '15 at 15:54















How this will tell me why my nginx not stopping and why it is creating new processes every time I kill them?
– Sukhjinder Singh
Sep 9 '15 at 10:35




How this will tell me why my nginx not stopping and why it is creating new processes every time I kill them?
– Sukhjinder Singh
Sep 9 '15 at 10:35












The Monit application uses PID file checks to see if an application is still running or not. That implies that a PID file must be available for an application, otherwise monit cannot guard it. If a daemon does not create a PID file, use a wrapper to create one. wiki.gentoo.org/wiki/…
– XakRu
Sep 9 '15 at 10:47




The Monit application uses PID file checks to see if an application is still running or not. That implies that a PID file must be available for an application, otherwise monit cannot guard it. If a daemon does not create a PID file, use a wrapper to create one. wiki.gentoo.org/wiki/…
– XakRu
Sep 9 '15 at 10:47












if you have monit, configured for nginx - at time when you will stop nginx, monit will start nginx automaticaly.
– XakRu
Sep 9 '15 at 10:48




if you have monit, configured for nginx - at time when you will stop nginx, monit will start nginx automaticaly.
– XakRu
Sep 9 '15 at 10:48












Pls, show your /var/log/messages file
– XakRu
Sep 9 '15 at 10:49




Pls, show your /var/log/messages file
– XakRu
Sep 9 '15 at 10:49












Can please provide any link how to setup monit on Ubuntu 14. Unfortunately the logs are empty this was the reason I need to restart the server after adding access_log on.
– Sukhjinder Singh
Sep 9 '15 at 15:54




Can please provide any link how to setup monit on Ubuntu 14. Unfortunately the logs are empty this was the reason I need to restart the server after adding access_log on.
– Sukhjinder Singh
Sep 9 '15 at 15:54

















 

draft saved


draft discarded















































 


draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f228471%2fnginx-stop-is-not-working-and-nginx-is-creating-new-process-after-killing-proces%23new-answer', 'question_page');

);

Post as a guest













































































wqsHjtKMS1oOh frWwEsn,Dg,AFdD6U5Z78sWNyaMtWvsT64DE5F,kLLhiYn
9mH2Xm0NX4XCVD1j1g,qtS4 LknG M8q2PIuxYihjNbe5TtRZ2 NfT0 3W5sXIj

Popular posts from this blog

How to check contact read email or not when send email to Individual?

How many registers does an x86_64 CPU actually have?

Displaying single band from multi-band raster using QGIS