summaryrefslogtreecommitdiff
path: root/config.ru
diff options
context:
space:
mode:
Diffstat (limited to 'config.ru')
-rw-r--r--config.ru4
1 files changed, 4 insertions, 0 deletions
diff --git a/config.ru b/config.ru
index 065ce59932f..e0b21ac66e8 100644
--- a/config.ru
+++ b/config.ru
@@ -2,6 +2,7 @@
if defined?(Unicorn)
require 'unicorn'
+ require 'unicorn/soft_timeout'
if ENV['RAILS_ENV'] == 'production' || ENV['RAILS_ENV'] == 'staging'
# Unicorn self-process killer
@@ -12,6 +13,9 @@ if defined?(Unicorn)
# Max memory size (RSS) per worker
use Unicorn::WorkerKiller::Oom, min, max
+
+ soft_timeout = (ENV['GITLAB_UNICORN_SOFT_TIMEOUT'] || 55).to_i
+ use Unicorn::SoftTimeout soft_timeout
end
end