summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAchilleas Pipinellis <axilleas@axilleas.me>2016-06-16 09:04:30 +0200
committerAchilleas Pipinellis <axilleas@axilleas.me>2016-06-16 09:04:30 +0200
commitb4e6b9873550754e837a4f474aced97907c01beb (patch)
treef621f9ffe2664a85da4efab4ce2eaae773127db8
parentbe098459147f0cd4323db7e0cca44160b5236ff4 (diff)
downloadgitlab-ce-unicorn-settings-doc.tar.gz
Move unicorn settings doc from Omnibus to CEunicorn-settings-doc
[ci skip]
-rw-r--r--doc/administration/unicorn.md44
1 files changed, 44 insertions, 0 deletions
diff --git a/doc/administration/unicorn.md b/doc/administration/unicorn.md
new file mode 100644
index 00000000000..bdac697cd09
--- /dev/null
+++ b/doc/administration/unicorn.md
@@ -0,0 +1,44 @@
+# Unicorn settings
+
+If you need to adjust the Unicorn timeout or the number of workers you can use
+the following settings in `/etc/gitlab/gitlab.rb`.
+Run `sudo gitlab-ctl reconfigure` for the change to take effect.
+
+```ruby
+unicorn['worker_processes'] = 3
+unicorn['worker_timeout'] = 60
+```
+
+## Advanced settings
+
+Change the following settings only if you really need to.
+
+```
+unicorn['listen'] = '127.0.0.1'
+unicorn['port'] = 8080
+unicorn['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket'
+unicorn['pidfile'] = '/opt/gitlab/var/unicorn/unicorn.pid'
+unicorn['tcp_nopush'] = true
+unicorn['backlog_socket'] = 1024
+```
+
+Make sure `somaxconn` is equal or higher than `backlog_socket`.
+
+```
+unicorn['somaxconn'] = 1024
+```
+
+We do not recommend changing this setting, but if you really must to:
+
+```
+unicorn['log_directory'] = "/var/log/gitlab/unicorn"
+```
+
+Only change these settings if you understand well what they mean
+see https://about.gitlab.com/2015/06/05/how-gitlab-uses-unicorn-and-unicorn-worker-killer/
+and https://github.com/kzk/unicorn-worker-killer
+
+```
+unicorn['worker_memory_limit_min'] = "300 * 1 << 20"
+unicorn['worker_memory_limit_max'] = "350 * 1 << 20"
+```