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

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


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:


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


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?


|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.