0

PS shows nginx as starting early on server boot. For example, running

ps -e -o pid,user,etime,args

shows:

1136 root 09:50 /usr/sbin/sshd -D
1147 root 09:50 cron
1162 root 09:50 nginx: master process /usr/sbin/nginx -g daemon on; master_process on;
...
1248 pgb 09:43 /usr/sbin/pgbouncer -d /var/local/pgbouncer/pgbouncer.ini
...
1436 root 09:31 /usr/sbin/apache2 -k start

The third column shows elapsed run time, in minutes and seconds.

Nginx has started the same second as sshd, 7 seconds before pgbouncer, and 19 seconds before apache2.

The rc2.d scripts are:

S20pgbouncer
S91apache2
S92nginx

So nginx should be starting after all the other scripts, but ps shows it to be starting first. Why is that?

1

Upstart/Init hybrids are confusing to me but I do understand it can start things in parallel and that perhaps those filenames don't matter so much. Is it possible any of those were started with upstart?

https://help.ubuntu.com/community/UpstartHowto

|improve this answer|||||
  • That was it. Removing the /etc/init/nginx.conf file eliminated the observed phenomenon. – Rdbhost Aug 13 '16 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.