Running unicorn gracefully on Heroku

Jamie Wilkinson jamie at
Thu Mar 8 05:58:24 UTC 2012

On Mar 7, 2012, at 1:27 PM, Alex Sharp wrote:

> This guy seems to have figured it out:

Yeah this works great, I've used it for all my Heroku rails apps without issue for a while now. You just put unicorn in your bundle, make a Procfile like

	web: bundle exec unicorn -p $PORT -c ./config/unicorn.rb

and a config/unicorn.rb like

	worker_processes 2
	timeout 5 # Heroku timeout is 5s

Related: like this post[1] I'm also interested in a smarter way to trap Heroku's SIGINT restarts into a unicorn USR2-styl restart, so we can actually take advantage of unicorn. At high concurrency Heroku's "kill world" restarts cause a lot of errors.

[1] <>

More information about the mongrel-unicorn mailing list