Skip to content
[email protected] edited this page Oct 21, 2013 · 1 revision

The (Gunicorn)[http://gunicorn.org/] web server for UNIX is preferred for Linux/OSX users who don't want to run a full ngingx/apache+uwsgi-python service. Using it is a snap:

  • Install gunicorn: pip install gunicorn / apt-get install gunicorn
  • cd $WEB2PY_HOME
  • gunicorn -w 10 -t 1000 gluon.main:wsgibase

Useful Gunicorn Options

  -w INT, --workers INT
                        The number of worker process for handling requests.
                        [1]
  -D, --daemon          Daemonize the Gunicorn process. [False]
  -t INT, --timeout INT
                        Workers silent for more than this many seconds are
                        killed and restarted. [30]
  -b ADDRESS, --bind ADDRESS
                        The socket to bind. [['127.0.0.1:8000']]

By default gunicorn listens on 127.0.0.1:8000.

Clone this wiki locally