From: Eric Wong <normalperson@yhbt.net>
To: Pierre Baillet <oct@fotonauts.com>
Cc: mongrel-unicorn@rubyforge.org
Subject: Re: Fwd: Support for Soft Timeout in Unicorn
Date: Thu, 3 Jun 2010 11:47:30 -0700 [thread overview]
Message-ID: <20100603184730.GA2421@dcvr.yhbt.net> (raw)
In-Reply-To: <AANLkTile44yxAsA3bT_nGEgLHQcCeRd5tKspdKs2rOoV@mail.gmail.com>
Pierre Baillet <oct@fotonauts.com> wrote:
> Eric,
>
> On Thu, Jun 3, 2010 at 8:22 PM, Eric Wong <normalperson@yhbt.net> wrote:
> > This would be doable as middleware, too, and if done carefully, even
> > safely reusable in multi-threaded web servers. This would be a good
> > addition to rack-contrib, even. I might consider doing it myself if I
> > had time.
>
> I also think that doing this as a Rack middleware is probably the
> right way to do that kind of worker management. However the
> application we use at fotopedia is still Rails 2.1 based (hence not
> Rack compatible AFAIK). This probably means we'll have keep on
> maintaining this slightly hacked version on our own then.
Actually, internally, Unicorn only knows about Rack and wraps older
CGI-based Rails using the Unicorn::App::OldRails application (via
Unicorn::CGIWrapper).
"unicorn_rails" basically wraps up the following config for you,
but you could achieve the same effect using "unicorn" and an
explicitly written config.ru:
------------ config.ru -------------
ENV["RAILS_ENV"] ||= ENV["RACK_ENV"]
require 'config/boot'
require 'config/environment'
require 'unicorn/app/old_rails'
require 'unwritten_timeout_middleware'
use UnwrittenTimeoutMiddleware # :)
use Unicorn::App::OldRails::Static # optional
run Unicorn::App::OldRails.new
------------------------------------
> Thank you for Unicorn ! :)
No problem :)
--
Eric Wong
_______________________________________________
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
next prev parent reply other threads:[~2010-06-03 18:47 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-03 17:37 Fwd: Support for Soft Timeout in Unicorn Eric Wong
2010-06-03 18:06 ` Pierre Baillet
2010-06-03 18:22 ` Fwd: " Eric Wong
2010-06-03 18:32 ` Pierre Baillet
2010-06-03 18:47 ` Eric Wong [this message]
2010-06-03 19:38 ` Chris Wanstrath
2010-06-03 19:40 ` Pierre Baillet
2010-06-09 13:17 ` Pierre Baillet
2010-06-11 1:56 ` Eric Wong
2010-06-04 20:59 ` Eric Wong
2010-06-18 20:13 ` Ryan Tomayko
2010-06-18 21:48 ` Eric Wong
2010-06-21 19:03 ` Ryan Tomayko
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=20100603184730.GA2421@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=mongrel-unicorn@rubyforge.org \
--cc=oct@fotonauts.com \
/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).