I installed an upstart service for sidekiq exactly as specified in it's wiki.
That said, I have an upstart script that creates a process with:
# skipped other insstructions
script
exec /bin/bash <<'EOT'
source /home/me/.my_env
cd /home/me
exec bin/sidekiq -e production
EOT
end script
The service perfectly starts, but as one might see, sidekiq's PID is not equal to the PID that is known to upstart
.
» initctl status sidekiq
# sidekiq start/running, process 16020
» ps axww|grep sidekiq
# 16181 ? Sl 0:41 sidekiq 3.0.0 me[0 of 3 busy]
That configuration works for any other upstart script save for sidekiq:
» sudo initctl stop sidekiq
# sidekiq stop/waiting
» ps axww|grep sidekiq
# 16181 ? Sl 0:45 sidekiq 3.0.0 me[0 of 3 busy]
It seems that initctl
kills the bash process, that it treats as the job (16020), but underlying sidekiq
continues to live:
» ps axww|grep '16181\|16020'
# 16181 ? Sl 0:45 sidekiq 3.0.0 me[0 of 3 busy]
What am I doing wrong?