Fresh Ubuntu 12.04 instance running on Amazon EC2
got Nginx running with Passenger
added an upstart script
description "NGiNX starter"
start on (local-filesystems and runlevel [2345])
stop on runlevel [016]
respawn
exec /etc/nginx/sbin/nginx
the issue is that I have multiple nginx processing running (beyond worker threads)
$ ps aux | grep nginx
root 720 0.0 0.2 39624 1228 ? Ss 03:23 0:00 nginx: master process /etc/nginx/sbin/nginx
www-data 722 0.0 0.3 40136 1884 ? S 03:23 0:00 nginx: worker process
www-data 723 0.0 0.3 40136 1884 ? S 03:23 0:00 nginx: worker process
www-data 724 0.0 0.3 40136 2388 ? S 03:23 0:00 nginx: worker process
www-data 725 0.0 0.3 40136 1884 ? S 03:23 0:00 nginx: worker process
www-data 726 0.0 0.3 40136 1884 ? S 03:23 0:00 nginx: worker process
root 2218 0.0 0.6 39620 3688 ? Ss 03:45 0:00 /etc/nginx/sbin/nginx
the way I read this is that process 720 has been started correctly and that processes 722,723,724,725,726 represent the worker threads configured in nginx.conf
what I don't get is what process 2218 is doing? when I try
sudo kill 2218
I get the message
kill: No such process
when I then check with ps aux | grep nginx again the rogue process will be running under a new PID
thinking that there is something going on with the upstart script since if I move it out of /etc/init reboot the instance and then run the same ps aux | grep nginx nothing is running
if I then boot nginx manually then the rogue thread does not appear
I've used this same script on another server for over a year without issue any ideas what I'm doing wrong?