diff options
author | Abubakar Siddiq Ango <h4xx22live@gmail.com> | 2019-01-10 13:19:51 +0000 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-01-10 13:19:51 +0000 |
commit | 432148b606770611c0ac3058c0f9e878f403d7a1 (patch) | |
tree | 59494fc107764ec1881dd3ac1adccf62ca65fb68 /doc | |
parent | 840e7e0e785ce13a928c6e606e36fad20e08e8e9 (diff) | |
download | gitlab-ce-432148b606770611c0ac3058c0f9e878f403d7a1.tar.gz |
Setting Unicorn Worker memory limit in gitlab.rb
Diffstat (limited to 'doc')
-rw-r--r-- | doc/administration/operations/unicorn.md | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/doc/administration/operations/unicorn.md b/doc/administration/operations/unicorn.md index bad61151bda..0e2079cb093 100644 --- a/doc/administration/operations/unicorn.md +++ b/doc/administration/operations/unicorn.md @@ -60,7 +60,17 @@ Unicorn master then automatically replaces the worker process. This is a robust way to handle memory leaks: Unicorn is designed to handle workers that 'crash' so no user requests will be dropped. The unicorn-worker-killer gem is designed to only terminate a worker process _in -between requests_, so no user requests are affected. +between requests_, so no user requests are affected. You can set the minimum and +maximum memory threshold (in bytes) for the Unicorn worker killer by +setting the following values `/etc/gitlab/gitlab.rb`: + +```ruby +unicorn['worker_memory_limit_min'] = "400 * 1 << 20" +unicorn['worker_memory_limit_max'] = "650 * 1 << 20" +``` + +Otherwise, you can set the `GITLAB_UNICORN_MEMORY_MIN` and `GITLAB_UNICORN_MEMORY_MIN` +[environment variables](../environment_variables.md). This is what a Unicorn worker memory restart looks like in unicorn_stderr.log. You see that worker 4 (PID 125918) is inspecting itself and decides to exit. |