diff options
author | Robert Speicher <robert@gitlab.com> | 2016-01-20 18:44:51 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2016-01-20 13:45:13 -0500 |
commit | 5f192df81170e41d6c8ee8d97f39dcb686853461 (patch) | |
tree | 48cddbc5c90d04821291eb8f5105f891fe91339e /config.ru | |
parent | d3af84afb801b85c109b27e7457e2247b2d54bd3 (diff) | |
download | gitlab-ce-5f192df81170e41d6c8ee8d97f39dcb686853461.tar.gz |
Merge branch 'adjust-unicorn-memory-limits' into 'master'
Use ENV variables for Unicorn worker killer & increase default limits
Merge request that lead to this particular merge request:
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/2421
[ci skip]
See merge request !2513
Diffstat (limited to 'config.ru')
-rw-r--r-- | config.ru | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/config.ru b/config.ru index a2525c81361..065ce59932f 100644 --- a/config.ru +++ b/config.ru @@ -7,8 +7,11 @@ if defined?(Unicorn) # Unicorn self-process killer require 'unicorn/worker_killer' + min = (ENV['GITLAB_UNICORN_MEMORY_MIN'] || 300 * 1 << 20).to_i + max = (ENV['GITLAB_UNICORN_MEMORY_MAX'] || 350 * 1 << 20).to_i + # Max memory size (RSS) per worker - use Unicorn::WorkerKiller::Oom, (200 * (1 << 20)), (250 * (1 << 20)) + use Unicorn::WorkerKiller::Oom, min, max end end |