start-stop-daemon nginx issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[root@dev:~]# lsb_release -a | |
No LSB modules are available. | |
Distributor ID: Ubuntu | |
Description: Ubuntu 12.04.4 LTS | |
Release: 12.04 | |
Codename: precise | |
[root@dev:~]# cat /var/run/nginx.pid | |
23616 | |
[root@dev:~]# pgrep nginx | |
23616 | |
23617 | |
23618 | |
23619 | |
23620 | |
[root@dev:~]# cat /var/log/nginx/error.log | |
[root@dev:~]# start-stop-daemon --stop --signal HUP --quiet --pidfile /var/run/nginx.pid --name nginx | |
[root@dev:~]# cat /var/log/nginx/error.log | |
2014/06/04 13:07:17 [debug] 24028#0: epoll add event: fd:7 op:1 ev:00002001 | |
[root@dev:~]# pgrep nginx | |
23616 | |
24028 | |
[root@dev:~]# ps ax | grep nginx | |
23616 ? Ss 0:00 nginx: master process /usr/sbin/nginx | |
24028 ? S 0:00 nginx: worker process | |
[root@dev:~]# cat /var/log/nginx/error.log | |
2014/06/04 13:07:17 [debug] 24028#0: epoll add event: fd:7 op:1 ev:00002001 | |
[root@dev:~]# cat /var/run/nginx.pid | |
cat: /var/run/nginx.pid: No such file or directory |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
nginx starts at installation time with a default configuration file, ansible deploys a new configuration file with different pid file path and reduced amount of workers. nginx can't handle a pid_file change properly
http://jpetazzo.github.io/2013/10/06/policy-rc-d-do-not-start-services-automatically/