Skip to content

Commit fbec385

Browse files
committed
Add multiple workers to gunicorn
1 parent 837c346 commit fbec385

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

docker/entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ echo "Inserting default data"
1313
python manage.py insert_default_data
1414

1515
echo "Starting web server"
16-
gunicorn --bind 0.0.0.0:8000 --pythonpath /app/squest Squest.wsgi
16+
gunicorn --bind 0.0.0.0:8000 --workers ${GUNICORN_WORKERS:-4} --pythonpath /app/squest Squest.wsgi

docker/environment_variables/squest.env

+2
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,5 @@ REDIS_CACHE_HOST=redis-cache
3333

3434
WAIT_HOSTS=db:3306,rabbitmq:5672
3535
WAIT_TIMEOUT=60
36+
37+
GUNICORN_WORKERS=4

docs/configuration/squest_settings.md

+6
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,12 @@ Set to `True` to enable email notifications.
208208

209209
Set to `True` to change the navbar and footer color to visually identify a testing instance of Squest.
210210

211+
### GUNICORN_WORKERS
212+
213+
**Default:** `4`
214+
215+
Number of workers used by Gunicorn process in charge of serving client connection. Increase the number of worker threads to serve more clients concurrently
216+
211217
## SMTP
212218

213219
### EMAIL_HOST

0 commit comments

Comments
 (0)