From: Eric Wong <normalperson@yhbt.net>
To: unicorn list <mongrel-unicorn@rubyforge.org>
Subject: Re: Nginx Conf
Date: Sun, 22 Nov 2009 22:53:50 +0000 [thread overview]
Message-ID: <20091122225350.GC29926@dcvr.yhbt.net> (raw)
In-Reply-To: <1258616971.7438.1.camel@hbartels-laptop>
huet bartels <hbartels@i-neda.com> wrote:
> Thank you all very much for you time.
>
> I will have a look at the configuration examples today.
Sorry for the late reply, I forgot about this thread (and I'm lazy
about following links).
One general thing about the nginx configs I've seen is that they're
missing the fail_timeout=0 directive in the "server" lines.
I highly recommend setting it since it's a low cost to try an upstream
for nginx, and you can avoid 502 errors in case there's a bug in your
app that causes a Unicorn worker to not send a valid HTTP response
(including hitting the app timeout).
I actually have this in the Configurator documentation[1]:
# # See http://wiki.nginx.org/NginxHttpUpstreamModule for more details
# # on nginx upstream configuration:
# upstream unicorn_backend {
# # for UNIX domain socket setups:
# server unix:/path/to/unicorn.sock fail_timeout=0;
#
# # for TCP setups
# server 192.168.0.7:8080 fail_timeout=0;
# server 192.168.0.8:8080 fail_timeout=0;
# server 192.168.0.9:8080 fail_timeout=0;
# }
[1] - http://unicorn.bogomips.org/Unicorn/Configurator.html
We've had fail_timeout=0 deployed to several places (many non-Unicorn
servers) here and there and have experienced no negative effects
(we're pretty good about keeping our backends up :)
If anybody can recommend a better place in the Unicorn docs to put this,
that'd be great, too... Maybe I'll drop something in the examples/
directory.
--
Eric Wong
next prev parent reply other threads:[~2009-11-22 22:57 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-19 7:49 RE:Nginx Conf huet bartels
2009-11-22 22:53 ` Eric Wong [this message]
2009-11-23 3:57 ` Nginx Conf Dylan Stamat
2009-11-24 7:19 ` Eric Wong
-- strict thread matches above, loose matches on Subject: below --
2009-11-18 8:58 huet bartels
2009-11-18 9:35 ` John-Paul Bader
2009-11-18 18:17 ` Dylan Stamat
2009-11-19 8:11 ` John-Paul Bader
2009-11-18 18:22 ` Matt Mongeau
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=20091122225350.GC29926@dcvr.yhbt.net \
--to=normalperson@yhbt.net \
--cc=mongrel-unicorn@rubyforge.org \
/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).