Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the best way to stop a Unicorn Server process from running?

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.

like image 523
ChuckJHardy Avatar asked Jan 20 '11 16:01

ChuckJHardy


People also ask

What is Unicorn app server?

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.


1 Answers

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.

like image 123
Rob Cameron Avatar answered Oct 11 '22 10:10

Rob Cameron