huet bartels <[email protected]> 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
_______________________________________________
mongrel-unicorn mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/mongrel-unicorn