Parent

Unicorn::HttpServer

This is the process manager of Unicorn. This manages worker processes which in turn handle the I/O and application process. Listener sockets are started in the master process and shared with forked worker children.

Users do not need to know the internals of this class, but reading the source is education for programmers wishing to learn how Unicorn works. See Unicorn::Configurator for information on how to configure Unicorn.

Constants

START_CTX

We populate this at startup so we can figure out how to reexecute and upgrade the currently running instance of Unicorn This Hash is considered a stable interface and changing its contents will allow you to switch between different installations of Unicorn or even different installations of the same applications without downtime. Keys of this constant Hash are described as follows:

  • 0 - the path to the unicorn/unicorn_rails executable

  • :argv - a deep copy of the ARGV array the executable originally saw

  • :cwd - the working directory of the application, this is where

you originally started Unicorn.

To change your unicorn executable to a different path without downtime, you can set the following in your Unicorn config file, HUP and then continue with the traditional USR2 + QUIT upgrade steps:

Unicorn::HttpServer::START_CTX[0] = "/home/bofh/1.9.2/bin/unicorn"

Originally generated with the Darkfish Rdoc Generator 2, modified by wrongdoc.

We love to hear from you!
Email patches (with git send-email), pull requests, questions, bug reports, suggestions, etc. to us publically at mongrel-unicorn@rubyforge.org.
No subscription to the mailing list is necessary, just let us know to Cc: you if you're unsubscribed.
To subscribe, email mongrel-unicorn-request@rubyforge.org with "subscribe" in the Subject and respond to the automated confirmation message.
Do not waste bandwidth with HTML, HTML mail will not be read.
Quote only parts you're responding to and do not top post.
For sensitive topics, email us privately at unicorn@bogomips.org.