Merge branch 'add-redis-config-options' into 'master'
Add configurable option of 'maxclients' to redis tunables Adds templating, documentation, and defaults for tuning the Redis 'maxclients' attribute that governs the maximum number of connections a Redis server may serve. Resolves #1339 See merge request !812
This commit is contained in:
commit
535540cbad
|
@ -26,3 +26,15 @@ managed by omnibus-gitlab reachable via TCP.
|
|||
redis['port'] = 6379
|
||||
redis['bind'] = '127.0.0.1'
|
||||
```
|
||||
|
||||
## Increasing the number of Redis connections beyond the default
|
||||
|
||||
By default Redis will only accept 10,000 client connections. If you need
|
||||
more that 10,000 connections set the 'maxclients' attribute to suite your needs.
|
||||
Be advised that adjusting the maxclients attribute means that you will also need
|
||||
to take into account your systems settings for fs.file-max (i.e. "sysctl -w fs.file-max=20000")
|
||||
|
||||
```ruby
|
||||
redis['maxclients'] = 20000
|
||||
```
|
||||
|
||||
|
|
|
@ -489,6 +489,7 @@ external_url 'GENERATED_EXTERNAL_URL'
|
|||
|
||||
# redis['enable'] = true
|
||||
# redis['username'] = "gitlab-redis"
|
||||
# redis['maxclients'] = "10000"
|
||||
# redis['uid'] = nil
|
||||
# redis['gid'] = nil
|
||||
|
||||
|
|
|
@ -383,6 +383,7 @@ default['gitlab']['redis']['shell'] = "/bin/nologin"
|
|||
default['gitlab']['redis']['home'] = "/var/opt/gitlab/redis"
|
||||
default['gitlab']['redis']['bind'] = '127.0.0.1'
|
||||
default['gitlab']['redis']['port'] = 0
|
||||
default['gitlab']['redis']['maxclients'] = "10000"
|
||||
default['gitlab']['redis']['password'] = nil
|
||||
default['gitlab']['redis']['unixsocket'] = "/var/opt/gitlab/redis/redis.socket"
|
||||
default['gitlab']['redis']['unixsocketperm'] = "777"
|
||||
|
|
|
@ -483,7 +483,7 @@ slave-priority 100
|
|||
# Once the limit is reached Redis will close all the new connections sending
|
||||
# an error 'max number of clients reached'.
|
||||
#
|
||||
# maxclients 10000
|
||||
maxclients <%= @maxclients %>
|
||||
|
||||
# Don't use more memory than the specified amount of bytes.
|
||||
# When the memory limit is reached Redis will try to remove keys
|
||||
|
|
Loading…
Reference in New Issue