Add workers number on Gunicorn

Add optimum workers number on Gunicorn, based on cpu numbers (https://docs.gunicorn.org/en/stable/design.html)
pull/978/head
charnesp 2021-04-16 18:16:40 +02:00 zatwierdzone przez GitHub
rodzic 4ac9c44972
commit 7161328f4f
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -140,7 +140,7 @@ else
congrats
nginx -c $(pwd)/nginx/$conf
gunicorn webodm.wsgi --bind unix:/tmp/gunicorn.sock --timeout 300000 --max-requests 250 --preload
gunicorn webodm.wsgi --bind unix:/tmp/gunicorn.sock --timeout 300000 --max-requests 250 --workers $((2*$(grep -c '^processor' /proc/cpuinfo)+1)) --preload
fi
# If this is executed, it means the previous command failed, don't display the congratulations message