Increase gunicorn workers
This commit is contained in:
parent
bc2ccc9347
commit
41b3a31a6c
2 changed files with 7 additions and 1 deletions
|
|
@ -30,6 +30,7 @@ in
|
|||
"mail@jalr.de"
|
||||
];
|
||||
};
|
||||
gunicornWorkers = 32;
|
||||
};
|
||||
|
||||
services.nginx = {
|
||||
|
|
|
|||
|
|
@ -106,6 +106,11 @@ in
|
|||
type = types.path;
|
||||
description = "Path to the sops secrets file which stores pretix.cfg settings.";
|
||||
};
|
||||
gunicornWorkers = mkOption {
|
||||
type = types.int;
|
||||
description = "Number of gunicorn workers. Recommended is roughly two times the number of CPU cores available.";
|
||||
default = 2;
|
||||
};
|
||||
mail = {
|
||||
enable = mkEnableOption "Enables or disables emailing.";
|
||||
from = mkOption {
|
||||
|
|
@ -232,7 +237,7 @@ in
|
|||
set -euo pipefail
|
||||
export PRETIX_CONFIG_FILE="$CREDENTIALS_DIRECTORY/config"
|
||||
exec ${pythonPackages.gunicorn}/bin/gunicorn pretix.wsgi --name ${name} \
|
||||
--workers 3 \
|
||||
--workers ${toString cfg.gunicornWorkers} \
|
||||
--log-level=info \
|
||||
--bind=${bind.host}:${toString bind.port}
|
||||
'';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue