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
This commit is contained in:
commit
67bd2ed3a2
2 changed files with 6 additions and 1 deletions
|
@ -7,8 +7,11 @@ if defined?(Unicorn)
|
||||||
# Unicorn self-process killer
|
# Unicorn self-process killer
|
||||||
require 'unicorn/worker_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
|
# Max memory size (RSS) per worker
|
||||||
use Unicorn::WorkerKiller::Oom, (200 * (1 << 20)), (250 * (1 << 20))
|
use Unicorn::WorkerKiller::Oom, min, max
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -17,6 +17,8 @@ DATABASE_URL | url | For example: postgresql://localhost/blog_development?pool=5
|
||||||
GITLAB_EMAIL_FROM | email | Email address used in the "From" field in mails sent by GitLab
|
GITLAB_EMAIL_FROM | email | Email address used in the "From" field in mails sent by GitLab
|
||||||
GITLAB_EMAIL_DISPLAY_NAME | string | Name used in the "From" field in mails sent by GitLab
|
GITLAB_EMAIL_DISPLAY_NAME | string | Name used in the "From" field in mails sent by GitLab
|
||||||
GITLAB_EMAIL_REPLY_TO | email | Email address used in the "Reply-To" field in mails sent by GitLab
|
GITLAB_EMAIL_REPLY_TO | email | Email address used in the "Reply-To" field in mails sent by GitLab
|
||||||
|
GITLAB_UNICORN_MEMORY_MIN | integer | The minimum memory threshold (in bytes) for the Unicorn worker killer
|
||||||
|
GITLAB_UNICORN_MEMORY_MAX | integer | The maximum memory threshold (in bytes) for the Unicorn worker killer
|
||||||
|
|
||||||
## Complete database variables
|
## Complete database variables
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue