What is the best way to stop a Unicorn Server process from running? Whenever I try to stop it using kill -p 90234
it does not work. It is most likely something I am doing wrong.
Thanks.
Unicorn is an HTTP server for Ruby, similar to Mongrel or Thin. It uses Mongrel's Ragel HTTP parser but has a dramatically different architecture and philosophy. In the classic setup you have nginx sending requests to a pool of mongrels using a smart balancer or a simple round robin.
Have a look at the Unicorn SIGNALS page. If the master is behaving correctly and you just want to turn it off, you should send a QUIT signal:
kill -QUIT 1234 # where 1234 is the real process id, of course
That gracefully stops all the workers, letting them finish any requests that they're in the middle of serving.
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