For start application i use Foreman. Foreman start process from Procfile
web: bundle exec rails server thin -p $PORT
worker: bundle exec rake environment resque:work QUEUE=send_mail
api: bundle exec rails server thin -p $PORT
If i press control+C in console where i run foreman, foreman is ended but ran process is not killed. Is it possible to kill process that foreman ran when foreman killed.
Example below assumes port used is 4567, then do:
lsof -i :4567
This gives you the pid of the process, say 34564, then kill it with
kill -9 34564
If you are on windows, install cygwin to get lsof
and kill
commands.
Thin doesn't terminate as long as there are open connections. Faye uses long-polling or WebSockets (long lasting connections). So the end result is that Thin is waiting for your Faye connections to close.
Try to turn of the signal handlers installed by Thin and you should be fine.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With