Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Commits on Nov 29, 2012
  1. check_client_connection: document local-only requirement

    Eric Wong authored
    In my testing, only dropped clients over Unix domain sockets or
    loopback TCP were detected with this option.  Since many
    nginx+unicorn combinations run on the same host, this is not a
    Furthermore, tcp_nodelay:true appears to work over loopback,
    so remove the requirement for tcp_nodelay:false.
  2. Begin writing HTTP request headers early to detect disconnected clients

    Tom Burns authored Eric Wong committed
    This patch checks incoming connections and avoids calling the application
    if the connection has been closed.
    It works by sending the beginning of the HTTP response before calling
    the application to see if the socket can successfully be written to.
    By enabling this feature users can avoid wasting application rendering
    time only to find the connection is closed when attempting to write, and
    throwing out the result.
    When a client disconnects while being queued or processed, Nginx will log
    HTTP response 499 but the application will log a 200.
    Enabling this feature will minimize the time window during which the problem
    can arise.
    The feature is disabled by default and can be enabled by adding
    'check_client_connection true' to the unicorn config.
    [ew: After testing this change, Tom Burns wrote:
      So we just finished the US Black Friday / Cyber Monday weekend running
      unicorn forked with the last version of the patch I had sent you.  It
      worked splendidly and helped us handle huge flash sales without
      increased response time over the weekend.
      Whereas in previous flash traffic scenarios we would see the number of
      HTTP 499 responses grow past the number of real HTTP 200 responses,
      over the weekend we saw no growth in 499s during flash sales.
      Unexpectedly the patch also helped us ward off a DoS attack where the
      attackers were disconnecting immediately after making a request.
    ref: <>
    Signed-off-by: Eric Wong <>
Commits on Jan 28, 2012
  1. doc: update doc for Ruby 2.0.0dev CoW-friendliness

    Eric Wong authored
    Ruby 2.0.0dev is the future and includes a CoW-friendly GC,
    so we shall encourage folks to give Ruby 2.0.0dev a spin.
Commits on Apr 12, 2011
  1. @emmanuel

    Document "user" directive in example unicorn conf

    emmanuel authored Eric Wong committed
Commits on Oct 27, 2010
  1. examples/unicorn.conf: add a note about throttling signals

    Eric Wong authored
    Sending the same signal faster than the receiver can process
    means signals can get lost.
Commits on Jun 4, 2010
  1. doc: emphasize the importance of stderr_path

    Eric Wong authored
    While second nature to myself, stderr_path may be an
    overlooked configuration parameter for some users.  Also,
    add a minimal sample configuration file that is shorter
    and hopefully less intimidating to new users.
Commits on Nov 24, 2009
  1. Add examples for nginx and unicorn

    Eric Wong authored
    These should help make things easier for folks unfamiliar
    with nginx setups.
Something went wrong with that request. Please try again.