unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
From: Jamie Wilkinson <jamie@jamiedubs.com>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Cc: Seamus Abshere <seamus@abshere.net>
Subject: Re: Running unicorn gracefully on Heroku
Date: Wed, 7 Mar 2012 21:58:24 -0800	[thread overview]
Message-ID: <0F44E152-42AA-446B-938E-4A5ED999D797@jamiedubs.com> (raw)
In-Reply-To: <AFB6D2BEB13740858F3DE5A9F6AB900C@gmail.com>

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

> This guy seems to have figured it out: http://michaelvanrooijen.com/articles/2011/06/01-more-concurrency-on-a-single-heroku-dyno-with-the-new-celadon-cedar-stack/

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] <http://stackoverflow.com/questions/9605703/how-can-i-tell-unicorn-to-understand-herokus-signals>


_______________________________________________
Unicorn mailing list - mongrel-unicorn@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-unicorn
Do not quote signatures (like this one) or top post when replying

      reply	other threads:[~2012-03-08  7:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-07 16:49 Running unicorn gracefully on Heroku Seamus Abshere
2012-03-07 20:22 ` Eric Wong
2012-03-07 21:27   ` Alex Sharp
2012-03-08  5:58     ` Jamie Wilkinson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://yhbt.net/unicorn/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0F44E152-42AA-446B-938E-4A5ED999D797@jamiedubs.com \
    --to=jamie@jamiedubs.com \
    --cc=mongrel-unicorn@rubyforge.org \
    --cc=seamus@abshere.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).