diff options
author | Eric Wong <normalperson@yhbt.net> | 2009-11-11 14:32:38 -0800 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2009-11-11 14:33:19 -0800 |
commit | c155a8f2370afa8287b31922b0e3c14d05f98c8c (patch) | |
tree | 2aac10de3de91bbbd49ae2ebd25bc1e12c3e96a8 | |
parent | 87995dec06334eb6a52d3f991a86bc191037d4b9 (diff) | |
download | unicorn-c155a8f2370afa8287b31922b0e3c14d05f98c8c.tar.gz |
Hopefully this will help users and avoid redundant questions on the mailing list.
-rw-r--r-- | .document | 1 | ||||
-rw-r--r-- | FAQ | 39 |
2 files changed, 40 insertions, 0 deletions
@@ -1,3 +1,4 @@ +FAQ README TUNING PHILOSOPHY @@ -0,0 +1,39 @@ += Frequently Asked Questions about Unicorn + +=== Why are my redirects going to "http" URLs when my site uses https? + +If your site is entirely behind https, then Rack applications that use +"rack.url_scheme" can set the following in the Unicorn config file: + + HttpRequest::DEFAULTS["rack.url_scheme"] = "https" + +Otherwise, you can configure your proxy (nginx) to send the +"X-Forwarded-Proto: https" header only for parts of the site that use +https. For nginx, you can do it with the following line in appropriate +"location" blocks of your nginx config file: + + proxy_set_header X-Forwarded-Proto https; + +=== Why are log messages from Unicorn are unformatted when using Rails? + +Current versions of Rails unfortunately overrides the default Logger +formatter. + +You can undo this behavior with the default logger in your Unicorn +config file: + + Configurator::DEFAULTS[:logger].formatter = Logger::Formatter.new + +Of course you can specify an entirely different logger as well +with the "logger" directive described by Configurator. + +=== Why am I getting "connection refused"/502 errors under high load? + +Short answer: your application cannot keep up. + +You can increase the size of the :backlog parameter if your kernel +supports a larger listen() queue, but keep in mind having a large listen +queue makes failover to a different machine more difficult. + +See the TUNING and Configurator documents for more information on +:backlog-related topics. |