From 867a3e38c1e6bf57b9f4e1d3bae7678bf8b29d28 Mon Sep 17 00:00:00 2001 From: yackob03 Date: Fri, 20 Dec 2013 16:11:39 -0500 Subject: [PATCH] Switch gunicorn to using a config file, which allows command line parameters to be changed without restarting the master process. --- README.md | 2 +- gunicorn_config.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 gunicorn_config.py diff --git a/README.md b/README.md index edddaef82..22aa5c793 100644 --- a/README.md +++ b/README.md @@ -21,7 +21,7 @@ running: ``` sudo mkdir -p /mnt/nginx/ && sudo nginx -c `pwd`/nginx.conf -STACK=prod gunicorn -D --workers 4 -b unix:/tmp/gunicorn.sock --worker-class gevent -t 2000 application:application +STACK=prod gunicorn -c gunicorn_config.py ``` start the workers: diff --git a/gunicorn_config.py b/gunicorn_config.py new file mode 100644 index 000000000..59141b06d --- /dev/null +++ b/gunicorn_config.py @@ -0,0 +1,5 @@ +bind = 'unix:/tmp/gunicorn.sock' +workers = 8 +worker_class = 'gevent' +timeout = 2000 +daemon = True