From e082cfcaaac3e34e1a8a171f80f32cfd6440b521 Mon Sep 17 00:00:00 2001 From: Franz Pletz Date: Fri, 12 Aug 2016 19:17:43 +0200 Subject: [PATCH] gitlab module: restart services on failure Sidqkiq regularly dies due to memory leaks. --- nixos/modules/services/misc/gitlab.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/nixos/modules/services/misc/gitlab.nix b/nixos/modules/services/misc/gitlab.nix index ac2e94c25c33..df19efb55fdf 100644 --- a/nixos/modules/services/misc/gitlab.nix +++ b/nixos/modules/services/misc/gitlab.nix @@ -380,6 +380,7 @@ in { User = cfg.user; Group = cfg.group; TimeoutSec = "300"; + Restart = "on-failure"; WorkingDirectory = "${cfg.packages.gitlab}/share/gitlab"; ExecStart="${cfg.packages.gitlab.env}/bin/bundle exec \"sidekiq -q post_receive -q mailers -q system_hook -q project_web_hook -q gitlab_shell -q common -q default -e production -P ${cfg.statePath}/tmp/sidekiq.pid\""; }; @@ -404,6 +405,7 @@ in { User = cfg.user; Group = cfg.group; TimeoutSec = "300"; + Restart = "on-failure"; ExecStart = "${cfg.packages.gitlab-workhorse}/bin/gitlab-workhorse " + "-listenUmask 0 "