mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 07:15:54 +03:00
nixos/gitlab: Add option sidekiq.concurrency.
This commit adds an option to configure the amount of threads to use with sidekiq-cluster. The GitLab default is currently set to 20 threads. In space constrained environments this may become a problem with running out of memory as a result.
This commit is contained in:
parent
c5550f4f34
commit
dcd0f499c6
@ -901,6 +901,16 @@ in {
|
||||
'';
|
||||
};
|
||||
|
||||
sidekiq.concurrency = mkOption {
|
||||
type = with types; nullOr int;
|
||||
default = null;
|
||||
description = lib.mdDoc ''
|
||||
How many processor threads to use for processing sidekiq background job queues. When null, the GitLab default is used.
|
||||
|
||||
See <https://docs.gitlab.com/ee/administration/sidekiq/extra_sidekiq_processes.html#manage-thread-counts-explicitly> for details.
|
||||
'';
|
||||
};
|
||||
|
||||
sidekiq.memoryKiller.enable = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
@ -1454,12 +1464,17 @@ in {
|
||||
TimeoutSec = "infinity";
|
||||
Restart = "always";
|
||||
WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab";
|
||||
ExecStart = utils.escapeSystemdExecArgs [
|
||||
"${cfg.packages.gitlab}/share/gitlab/bin/sidekiq-cluster"
|
||||
"-e" "production"
|
||||
"-r" "."
|
||||
"*" # all queue groups
|
||||
];
|
||||
ExecStart = utils.escapeSystemdExecArgs (
|
||||
[
|
||||
"${cfg.packages.gitlab}/share/gitlab/bin/sidekiq-cluster"
|
||||
"*" # all queue groups
|
||||
] ++ lib.optionals (cfg.sidekiq.concurrency != null) [
|
||||
"--concurrency" (toString cfg.sidekiq.concurrency)
|
||||
] ++ [
|
||||
"--environment" "production"
|
||||
"--require" "."
|
||||
]
|
||||
);
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user