Permalink
Commits on Apr 30, 2011
  1. unicorn 1.1.7 - major fixes to minor components

    No changes to the core code, so this release only affects users
    of the Unicorn::OobGC and Unicorn::ExecCGI modules.
    Unicorn::OobGC was totally broken by the fix in the v1.1.6
    release and is now reimplemented.  Unicorn::ExecCGI (which
    hardly anybody uses) now returns proper HTTP status codes.
    Eric Wong committed Apr 30, 2011
  2. oob_gc: reimplement to fix breakage and add tests

    This was broken since v3.3.1[1] and v1.1.6[2] since nginx relies on
    a closed socket (and not Content-Length/Transfer-Encoding) to
    detect a response completion.  We have to close the client
    socket before invoking GC to ensure the client sees the response
    in a timely manner.
    
    [1] - commit b72a86f
    [2] - commit b7a0074
    
    (cherry picked from commit faeb322)
    
    Conflicts:
    
    	examples/big_app_gc.rb
    	lib/unicorn/oob_gc.rb
    Eric Wong committed Apr 29, 2011
Commits on Jan 21, 2011
  1. exec_cgi: handle Status header in CGI response

    We no longer blindly return 200 if the CGI returned another error
    code.  We also don't want two Status headers in our output since we
    no longer filter it out.
    (cherry picked from commit 6cca8e6)
    Eric Wong committed Jan 21, 2011
Commits on Jan 6, 2011
  1. unicorn 1.1.6 - one minor, esoteric bugfix

    We now close the client socket after closing the response body.
    This does not affect most applications that run under Unicorn,
    in fact, it may not affect any.
    Eric Wong committed Jan 6, 2011
  2. close client socket after closing response body

    Response bodies may capture the block passed to each
    and save it for body.close, so don't close the socket
    before we have a chance to call body.close
    
    (cherry picked from commit b72a86f)
    
    Conflicts:
    
    	lib/unicorn/http_server.rb
    	test/unit/test_response.rb
    Eric Wong committed Jan 6, 2011
Commits on Oct 27, 2010
  1. unicorn 1.1.5

    This maintenance release fixes several long-standing but
    recently-noticed bugs.  SIGHUP reloading now correctly restores
    default values if they're erased or commented-out in the Unicorn
    configuration file.  Delays/slowdowns in signal handling since
    0.990 are fixed, too.
    Eric Wong committed Oct 27, 2010
  2. doc: stop using deprecated rdoc CLI options

    -N and -a switches no longer exist in rdoc 2.5
    (cherry picked from commit 054c7df)
    Eric Wong committed Oct 27, 2010
  3. gemspec: depend on Isolate 3.0.0 for dev

    No reason to not use the latest and greatest!
    (cherry picked from commit 570a57c)
    
    Conflicts:
    
    	unicorn.gemspec
    Eric Wong committed Oct 27, 2010
  4. configurator: reloading with unset values restores default

    If a configuration directive is set at startup and later
    unset, it correctly restores the original default value
    as if it had never been set in the first place.
    
    This applies to the majority of the configuration values with
    a few exceptions:
    
    * This only applies to stderr_path and stdout_path when
      daemonized (the usual case, they'll be redirected to
      "/dev/null").  When NOT daemonized, we cannot easily redirect
      back to the original stdout/stderr destinations.
    
    * Unsetting working_directory does not restore the
      original working directory where Unicorn was started.
      As far as we can tell unsetting this after setting it is
      rarely desirable and greatly increases the probability of
      user error.
    (cherry picked from commit 51b2b90)
    Eric Wong committed Oct 27, 2010
  5. configurator: use "__send__" instead of "send"

    It's less ambiguous since this is a network server after all.
    (cherry picked from commit f62c585)
    Eric Wong committed Oct 27, 2010
  6. Rakefile: capture prerelease tags

    Since we do those, now.
    (cherry picked from commit 1d1a2b1)
    Eric Wong committed Oct 6, 2010
  7. Rakefile: don't post freshmeat on empty changelogs

    We don't want to flood or monopolize freshmeat.
    Eric Wong committed Oct 27, 2010
  8. fix delays in signal handling

    There is no need to loop in the master_sleep method at all, as
    the rest of the code is designed to function even on interrupted
    sleeps.
    
    This change is included as part of a larger cleanup in master.
    (commit bdc7971).  From maint:
    (cherry picked from commit 10037f2)
    
    Conflicts:
    
    	lib/unicorn.rb
    Eric Wong committed Oct 27, 2010
Commits on Oct 4, 2010
  1. unicorn 1.1.4 - small bug fix and doc updates

    We no longer unlinking actively listening sockets upon startup
    (but continue to unlink dead ones).  This bug could trigger
    downtime and nginx failures if a user makes an error and
    attempts to start Unicorn while it is already running.
    
    Thanks to Jordan Ritter for the detailed bug report leading to
    this fix.
    
    ref: http://mid.gmane.org/8D95A44B-A098-43BE-B532-7D74BD957F31@darkridge.com
    
    There are also minor documentation and test updates pulled in
    from master.  This is hopefully the last bugfix release of the
    1.1.x series.
    Eric Wong committed Oct 4, 2010
  2. update Rails 3 tests to use Rails 3 final

    Rails 3 is out, and requires no code changes on our end to work
    (as far as our tests show :)
    (cherry picked from commit da272fc)
    Eric Wong committed Aug 30, 2010
  3. avoid unlinking actively listening sockets

    While we've always unlinked dead sockets from nuked/leftover
    processes, blindly unlinking them can cause unnecessary failures
    when an active process is already listening on them.  We now
    make a simple connect(2) check to ensure the socket is not in
    use before unlinking it.
    
    Thanks to Jordan Ritter for the detailed bug report leading to
    this fix.
    
    ref: http://mid.gmane.org/8D95A44B-A098-43BE-B532-7D74BD957F31@darkridge.com
    (cherry picked from commit 1a2363b)
    Eric Wong committed Oct 4, 2010
  4. doc: update HACKING for documentation contributions

    We switched to RDoc 2.5.x long ago and this should clarify
    some documentation preferences I have.
    (cherry picked from commit 505a9e7)
    Eric Wong committed Sep 15, 2010
  5. doc: update Sandbox document for Bundler

    Thanks to Lawrence Pit, Jamie Wilkinson, and Eirik Dentz Sinclair.
    
    ref: mid.gmane.org/4C8986DA.7090603@gmail.com
    ref: mid.gmane.org/5F1A02DB-CBDA-4302-9E26-8050C2D72433@efficiency20.com
    (cherry picked from commit 1a75966)
    Eric Wong committed Sep 15, 2010
Commits on Aug 31, 2010
  1. TUNING: more on socket buffer sizes

    Large buffers can hurt as well as help.  And the difference
    in real apps that do a lot of things other than I/O often
    makes it not worth it.
    (cherry picked from commit f9a7a19)
    Eric Wong committed Aug 31, 2010
Commits on Aug 28, 2010
  1. unicorn 1.1.3 - small bug fixes

    This release fixes race conditions during SIGUSR1 log cycling.
    This bug mainly affects Rainbows! users serving static files,
    but some Rack apps use threads internally even under Unicorn.
    
    Other small fixes:
    * SIGTTIN works as documented after SIGWINCH
    * --help output from `unicorn` and `unicorn_rails` is more consistent
    Eric Wong committed Aug 28, 2010
  2. make log reopens even more robust in threaded apps

    A follow-up to 4b23693
    
    If multithreaded programming can be compared to juggling
    chainsaws, then multithreaded programming with signal handlers
    in play is akin to juggling chainsaws on a tightrope
    over shark-infested waters.
    (cherry picked from commit feab35f)
    Eric Wong committed Aug 28, 2010
  3. update Rails3 tests to use 3.0.0rc2

    No code changes needed, thankfully.
    (cherry picked from commit 18968f6)
    Eric Wong committed Aug 28, 2010
  4. make log reopens more robust in multithreaded apps

    IOError may occur due to race conditions as another thread
    may close the file immediately after we call File#closed?
    to check.
    
    Errno::EBADF may occur in some applications that close a file
    descriptor without notifying Ruby (or if two IO objects refer to
    the same descriptor, possibly one of them using IO#for_fd).
    (cherry picked from commit 4b23693)
    Eric Wong committed Aug 28, 2010
  5. bin/*: more consistent --help output

    This fixes a long-standing bug in the output of "unicorn_rails"
    where the program name was missing.
    (cherry picked from commit 096afc1)
    Eric Wong committed Aug 24, 2010
Commits on Jul 16, 2010
  1. SIGTTIN works after SIGWINCH

    In addition to SIGHUP, it should be possible to gradually bring
    workers back up (to avoid overloading the machine) when rolling
    back upgrades after SIGWINCH.
    
    Noticed-by: Lawrence Pit
    ref: http://mid.gmane.org/4C3F8C9F.2090903@gmail.com
    (cherry picked from commit f1d33c8)
    Eric Wong committed Jul 16, 2010
Commits on Jul 13, 2010
  1. unicorn 1.1.2 - fixing upgrade rollbacks

    This release is fixes a long-standing bug where the original PID
    file is not restored when rolling back from a USR2 upgrade.
    Presumably most upgrades aren't rolled back, so it took over a
    year to notice this issue.  Thanks to Lawrence Pit for
    discovering and reporting this issue.
    Eric Wong committed Jul 13, 2010
  2. Merge commit 'v1.0.1' into 1.1.x-stable

    * commit 'v1.0.1':
      unicorn 1.0.1 - bugfixes only
      SIGHUP deals w/ dual master pid path scenario
      launcher: do not re-daemonize when USR2 upgrading
      tee_input: safer record separator ($/) handling
    Eric Wong committed Jul 13, 2010
  3. unicorn 1.0.1 - bugfixes only

    The first maintenance release of 1.0.x, this release is
    primarily to fix a long-standing bug where the original PID file
    is not restored when rolling back from a USR2 upgrade.
    Presumably most upgrades aren't rolled back, so it took over a
    year to notice this issue.  Thanks to Lawrence Pit for
    discovering and reporting this issue.
    
    There is also a pedantic TeeInput bugfix which shouldn't affect
    real apps from the 1.1.x series and a test case fix for OSX,
    too.
    Eric Wong committed Jul 13, 2010
  4. SIGHUP deals w/ dual master pid path scenario

    As described in our SIGNALS documentation, sending SIGHUP to the
    old master (to respawn SIGWINCH-ed children) while the new
    master (spawned from SIGUSR2) is active is useful for backing
    out of an upgrade before sending SIGQUIT to the new master.
    
    Unfortunately, the SIGHUP signal to the old master will cause
    the ".oldbin" pid file to be reset to the non-".oldbin" version
    and thus attempt to clobber the pid file in use by the
    to-be-terminated new master process.
    
    Thanks to the previous commit to prevent redaemonization in the
    new master, the old master can reliably detect if the new master
    is active while it is reloading the config file.
    
    Thanks to Lawrence Pit for discovering this bug.
    ref: http://mid.gmane.org/4C3BEACF.7040301@gmail.com
    (cherry picked from commit c13bec3)
    Eric Wong committed Jul 13, 2010
  5. launcher: do not re-daemonize when USR2 upgrading

    This was accidentally enabled when ready_pipe was developed.
    While re-daemonizing appears harmless in most cases this makes
    detecting backed-out upgrades from the original master process
    impossible.
    (cherry picked from commit 3f0f9d6)
    Eric Wong committed Jul 13, 2010
  6. SIGHUP deals w/ dual master pid path scenario

    As described in our SIGNALS documentation, sending SIGHUP to the
    old master (to respawn SIGWINCH-ed children) while the new
    master (spawned from SIGUSR2) is active is useful for backing
    out of an upgrade before sending SIGQUIT to the new master.
    
    Unfortunately, the SIGHUP signal to the old master will cause
    the ".oldbin" pid file to be reset to the non-".oldbin" version
    and thus attempt to clobber the pid file in use by the
    to-be-terminated new master process.
    
    Thanks to the previous commit to prevent redaemonization in the
    new master, the old master can reliably detect if the new master
    is active while it is reloading the config file.
    
    Thanks to Lawrence Pit for discovering this bug.
    ref: http://mid.gmane.org/4C3BEACF.7040301@gmail.com
    (cherry picked from commit c13bec3)
    Eric Wong committed Jul 13, 2010
  7. launcher: do not re-daemonize when USR2 upgrading

    This was accidentally enabled when ready_pipe was developed.
    While re-daemonizing appears harmless in most cases this makes
    detecting backed-out upgrades from the original master process
    impossible.
    (cherry picked from commit 3f0f9d6)
    Eric Wong committed Jul 13, 2010
Commits on Jul 11, 2010
  1. unicorn 1.1.1 - fixing cleanups gone bad :x

    Unicorn::TeeInput constant resolution for Unicorn::ClientError
    got broken simplifying code for RDoc.  This affects users
    of Rainbows! and Zbatery.
    Eric Wong committed Jul 11, 2010
  2. tee_input: fix constant resolution for client EOF

    Noticed while hacking on a Zbatery-using application
    (cherry picked from commit ac15513)
    Eric Wong committed Jul 11, 2010
Commits on Jul 8, 2010
  1. unicorn 1.1.0 - small changes and cleanups

    This is a small, incremental feature release with some internal
    changes to better support upcoming versions of the Rainbows! and
    Zbatery web servers.  There is no need to upgrade if you're
    happy with 1.0.0, but also little danger in upgrading.
    
    There is one pedantic bugfix which shouldn't affect anyone
    and small documentation updates as well.
    Eric Wong committed Jul 8, 2010