Thursday, July 9, 2015

TIP: tweak number of Gunicorn workers

Count number of Gunicorn workers

$ pgrep gunicorn.*work | wc -l
5

Add another worker by signaling the Gunicorn master

$ sudo pkill -TTIN  gunicorn.*mast

Verify another worker has appeared

$ pgrep gunicorn.*work | wc -l
6

Decrease the number of workers, verify its effect

$ sudo pkill -TTOU  gunicorn.*mast
$ pgrep gunicorn.*work | wc -l
5

No comments:

Post a Comment