Commits on Apr 17, 2012
  1. unicorn 4.3.0 - minor fixes and updates

    * PATH_INFO (aka REQUEST_PATH) increased to 4096 (from 1024).
      This allows requests with longer path components and matches
      the system PATH_MAX value common to GNU/Linux systems for
      serving filesystem components with long names.
    * Apps that fork() (but do not exec()) internally for background
      tasks now indicate the end-of-request immediately after
      writing the Rack response.
    Thanks to Hongli Lai, Lawrence Pit, Patrick Wenger and Nuo Yan
    for their valuable feedback for this release.
    Eric Wong committed Apr 17, 2012
  2. tests: set executable bit on integration shell scripts

    These should be made executable for ease-of-understanding and
    consistency, regardless of whether we actually execute them.
    Eric Wong committed Apr 17, 2012
  3. http: increase REQUEST_PATH maximum length to 4K

    The previous REQUEST_PATH limit of 1024 is relatively small and
    some users encounter problems with long URLs.  4K is a common
    limit for PATH_MAX on modern GNU/Linux systems and REQUEST_PATH
    is likely to translate to a filesystem path name.
    Thanks to Nuo Yan <> and Lawrence Pit
    <> for their feedback on this issue.
    Eric Wong committed Apr 12, 2012
Commits on Apr 13, 2012
  1. shutdown client socket for apps which fork in background

    Previously we relied on implicit socket shutdown() from the
    close() syscall.  However, some Rack applications fork()
    (without calling exec()), creating a potentially long-lived
    reference to the underlying socket in a child process.  This
    ends up causing nginx to wait on the socket shutdown when the
    child process exits.
    Calling shutdown() explicitly signals nginx (or whatever client)
    that the unicorn worker is done with the socket, regardless of
    the number of FD references to the underlying socket in
    This was not an issue for applications which exec() since
    FD_CLOEXEC is always set on the client socket.
    Thanks to Patrick Wenger for discovering this.  Thanks to
    Hongli Lai for the tip on using shutdown() as is done in
    Eric Wong committed Apr 12, 2012
  2. t/ use larger keys for tests

    This seems required for TLSv1.2 under OpenSSL 1.0.1
    Eric Wong committed Apr 13, 2012
Commits on Apr 11, 2012
  1. misc documentation spelling fixes

    Found via rdoc-spellcheck
    Eric Wong committed Apr 11, 2012
Commits on Mar 26, 2012
  1. unicorn 4.2.1 - minor fix and doc updates

    * Stale pid files are detected if a pid is recycled by processes
      belonging to another user, thanks to Graham Bleach.
    * nginx example config updates thanks to to Eike Herzbach.
    * KNOWN_ISSUES now documents issues with apps/libs that install
      conflicting signal handlers.
    Eric Wong committed Mar 26, 2012
Commits on Mar 24, 2012
  1. tests: depend on kgio 2.7.4

    This latest version of kgio improves portability to
    FreeBSD-based systems.
    Eric Wong committed Mar 24, 2012
Commits on Mar 20, 2012
  1. log EPERM errors from invalid pid files

    In some cases, EPERM may indicate a real configuration problem,
    but it can also just mean the pid file is stale.
    Eric Wong committed Mar 20, 2012
  2. KNOWN_ISSUES: document signal conflicts in libs/apps

    Jeffrey Yeung confirmed this issue on the mailing list.
    ref: <>
    Eric Wong committed Mar 20, 2012
  3. examples/nginx.conf: use $scheme instead of hard-coded "https"

    This adds a little more flexibility to the nginx config,
    especially as protocols (e.g. SPDY) become more prevalent.
    Suggested-by: Eike Herzbach <>
    Eric Wong committed Mar 20, 2012
  4. examples/nginx.conf: remove redundant word

    From: Eike Herzbach <>
    Eric Wong committed Mar 20, 2012
Commits on Feb 29, 2012
  1. Start the server if another user has a PID matching our stale pidfile.

    If unicorn doesn't get terminated cleanly (for example if the machine
    has its power interrupted) and the pid in the pidfile gets used by
    another process, the current unicorn code will exit and not start a
    server. This tiny patch fixes that behaviour.
    Acked-by: Eric Wong <>
    bleach committed with Eric Wong Feb 29, 2012
Commits on Jan 28, 2012
  1. unicorn 4.2.0

    The GPLv3 is now an option to the Unicorn license.  The existing GPLv2
    and Ruby-only terms will always remain options, but the GPLv3 is
    Daemonization is correctly detected on all terminals for development
    use (Brian P O'Rourke).
    Unicorn::OobGC respects applications that disable GC entirely
    during application dispatch (Yuichi Tateno).
    Many test fixes for OpenBSD, which may help other *BSDs, too.
    (Jeremy Evans).
    There is now _optional_ SSL support (via the "kgio-monkey"
    RubyGem).  On fast, secure LANs, SSL is only intended for
    detecting data corruption that weak TCP checksums cannot detect.
    Our SSL support is remains unaudited by security experts.
    There are also some minor bugfixes and documentation
    Ruby 2.0.0dev also has a copy-on-write friendly GC which can save memory
    when combined with "preload_app true", so if you're in the mood, start
    testing Unicorn with the latest Ruby!
    Eric Wong committed Jan 28, 2012
  2. doc: update doc for Ruby 2.0.0dev CoW-friendliness

    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.
    Eric Wong committed Jan 28, 2012
Commits on Jan 27, 2012
  1. script/isolate_for_tests: disable sqlite3-ruby for Ruby 2.0.0dev

    We don't need it because we don't test old Rails with bleeding edge Ruby.
    Eric Wong committed Jan 27, 2012
  2. disable old Rails tests for Ruby 2.0.0

    I doubt anybody would attempt to run ancient, unsupported versions
    of Rails on the latest (unreleased, even) versions of Ruby...
    Eric Wong committed Jan 27, 2012
  3. script/isolate_for_tests: update to kgio 2.7.2

    Again, we test with the latest version.
    Eric Wong committed Jan 27, 2012
Commits on Jan 24, 2012
  1. update tests for Rack 1.4.1

    Trying to ensure things always work with the latest version.
    Eric Wong committed Jan 24, 2012
Commits on Jan 8, 2012
  1. Rakefile: swap URL for

    Eric Wong committed Jan 8, 2012
Commits on Dec 28, 2011
  1. update tests for rack 1.4.0

    It's the latest and greatest version, so ensure everything
    works with it.
    Eric Wong committed Dec 28, 2011
Commits on Dec 17, 2011
  1. http: test case for "Connection: TE"

    We need to be sure we don't barf on this header.
    Eric Wong committed Dec 17, 2011
Commits on Dec 13, 2011
  1. cleanup exception handling on SIGUSR1

    No need to duplicate logic here
    Eric Wong committed Dec 13, 2011
  2. quiet possible IOError from SIGUSR1 (reopen logs)

    It's possible for a SIGUSR1 signal to be received in the
    worker immediately before calling  In that case,
    do not clutter logging with IOError and just process the
    reopen log request.
    Eric Wong committed Dec 13, 2011
Commits on Dec 5, 2011
  1. socket_helper: fix grammerr fail

    Oops :x
    Eric Wong committed Dec 5, 2011
  2. socket_helper: set SO_KEEPALIVE on TCP sockets

    Even LANs can break or be unreliable sometimes and socket
    disconnect messages get lost, which means we fall back to
    the global (kill -9) timeout in Unicorn.
    While the default global timeout is much shorter (60s) than
    typical TCP timeouts, some HTTP application dispatches take much
    I/O or computational time (streaming many gigabytes), so the
    global timeout becomes ineffective.
    Under Linux, sysadmins are encouraged to lower the default
    net.ipv4.tcp_keepalive_* knobs in sysctl.  There should be
    similar knobs in other operating systems (the default keepalive
    intervals are usually ridiculously high, too high for anything).
    When the listen socket has SO_KEEPALIVE set, the flag should be
    inherited by accept()-ed sockets.
    Eric Wong committed Dec 5, 2011
  3. socket_helper: remove out-of-date comment for TCP_NODELAY

    We favor low latency and consistency with the Unix socket
    behavior even with TCP.
    Eric Wong committed Dec 5, 2011
  4. bump dependencies

    We should always be testing with the newest available versions
    to watch for incompatibilities, even if we don't /require/ the
    latest ones to run.
    Eric Wong committed Dec 5, 2011
Commits on Nov 16, 2011
  1. tests: try to set a shorter path for Unix domain sockets

    We're only allowed 108 bytes for Unix domain sockets.
    mktemp(1) usually generates path names of reasonable length
    and we rely on it anyways.
    Eric Wong committed Nov 16, 2011
Commits on Nov 15, 2011
  1. tests: just use the sha1sum implemented in Ruby

    The output of SHA1 command-line tools is too unstable and
    I'm more comfortable with Ruby 1.9 encoding support than
    I was in 2009.
    Jeremy Evans noted the output of "openssl sha1" has
    changed since I last used it.
    Eric Wong committed Nov 15, 2011
  2. test_helper: ensure test client connects to valid address

    You can listen on, but trying to connect to it doesn't work
    well on OpenBSD.
    Acked-by: Eric Wong <>
    Jeremy Evans committed with Eric Wong Nov 15, 2011
  3. t0011: fix test under OpenBSD

    expr on OpenBSD uses a basic regular expression (according to
    re_format(7)), which doesn't support +, only *.
    Acked-by: Eric Wong <>
    Jeremy Evans committed with Eric Wong Nov 15, 2011
  4. configurator: limit timeout to 30 days

    There's no practical difference between a timeout of 30 days and
    68 years from an HTTP server standpoint.
    POSIX limits us to 31 days, actually, but there could be
    rounding error with floats used in Ruby time calculations and
    there's no real difference between 30 and 31 days, either...
    Thanks to Jeremy Evans for pointing out large values will throw
    EINVAL (on select(2) under OpenBSD with Ruby 1.9.3 and
    RangeError on older Rubies.
    Eric Wong committed Nov 15, 2011
  5. t: ensure SSL certificates exist on fresh test

    We throw up some fake SSL certs for testing
    Eric Wong committed Nov 15, 2011
Commits on Oct 4, 2011
  1. OobGC: force GC.start

    [ew: we need to explicitly enable GC if it is disabled
     and respect applications that disable GC]
    Acked-by: Eric Wong <>
    hotchpotch committed with Eric Wong Oct 3, 2011