0.01
No commit activity in last 3 years
No release in over 3 years
Unicorn Process Handler
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

RedUnicorn¶ ↑

RedUnicorn provides easy interaction with unicorn processes. It uses signals to communicate with unicorn to check its status, stop the processes or to provide zero downtime restarts.

Usage¶ ↑

$ red_unicorn --help
RedUnicorn::Unicorn: Unicorn process interactions
Usage: red_unicorn [opts] (prolicide | status | slaughter | start | restart | reload | stop | birth)
 -h, --help                             Show this help screen
 -p, --pid-file /path/to/file.pid       Specify path to PID file (default: /var/run/unicorn/unicorn.pid)
 -x, --unicorn-exec /path/to/unicorn    Specify path to unicorn executable (default: /var/www/shared/bundle/bin/unicorn_rails)
 -c, --unicorn-config /path/to/config   Specify path to unicorn configuration file (default: /etc/unicorn/app.rb)
 -t, --timeout 30                       Specify timeout for running actions
 -g, --restart-grace 8                  Specify grace time to start replacement children (default: 8 seconds)
 -e, --env production                   Specify environment (default: production)
 -k, --kind (unicorn|gunicorn)          Specify kind of unicorn in use (default: unicorn)
Commands:
  prolicide:        Kill single worker process
  status:           Returns current unicorn status
  slaughter:        Kill all worker processes (master remains)
  start:            Start unicorn
  restart:          Gracefully restart unicorn (zero downtime)
  reload:           Reload unicorn configuration
  stop:             Stop unicorn
  birth:            Create new worker process

Zero downtime restarts¶ ↑

RedUnicorn does its best to provide true zero downtime restarts. After sending unicorn the restart signal, it will wait until the new unicorn process has forked out workers before killing the original unicorn process. If no worker processes are started, the old unicorn process will be left running.

Unicorn agnostic¶ ↑

RedUnicorn is compatible with unicorn and gunicorn.

Bugs and Feature requests¶ ↑

  • Fork, make updates and send pull request

  • Report bugs through github’s issues

License¶ ↑

Copyright © 2012 Chris Roberts <chrisroberts.code@gmail.com> Licensed under the MIT license (see LICENSE)