Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbubakar Siddiq Ango <h4xx22live@gmail.com>2019-01-10 16:19:51 +0300
committerAchilleas Pipinellis <axil@gitlab.com>2019-01-10 16:19:51 +0300
commit432148b606770611c0ac3058c0f9e878f403d7a1 (patch)
tree59494fc107764ec1881dd3ac1adccf62ca65fb68
parent840e7e0e785ce13a928c6e606e36fad20e08e8e9 (diff)
Setting Unicorn Worker memory limit in gitlab.rb
-rw-r--r--doc/administration/operations/unicorn.md12
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.