Skip to content
Snippets Groups Projects
Commit 0cb950d3 authored by Ian Baum's avatar Ian Baum
Browse files

Merge branch 'sh-puma-somaxconn' into 'master'

Set net.core.somaxconn kernel parameter for Puma

Closes #5752

See merge request gitlab-org/omnibus-gitlab!4688
parents 192d0f3f 59885c60
No related branches found
No related tags found
No related merge requests found
---
title: Set net.core.somaxconn kernel parameter for Puma
merge_request: 4688
author:
type: performance
Loading
Loading
@@ -43,7 +43,7 @@ correspond to those in Puma, and which ones have no corresponding counterpart.
| `unicorn['pidfile']` | `puma['pidfile']` |
| `unicorn['tcp_nopush']` | n/a |
| `unicorn['backlog_socket']` | n/a |
| `unicorn['somaxconn']` | n/a |
| `unicorn['somaxconn']` | `puma['somaxconn']` |
| n/a | `puma['state_path']` |
| `unicorn['log_directory']` | `puma['log_directory']` |
| `unicorn['worker_memory_limit_min']` | n/a |
Loading
Loading
Loading
Loading
@@ -924,6 +924,8 @@ external_url 'GENERATED_EXTERNAL_URL'
# puma['listen'] = '127.0.0.1'
# puma['port'] = 8080
# puma['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket'
# puma['somaxconn'] = 1024
# puma['pidfile'] = '/opt/gitlab/var/puma/puma.pid'
# puma['state_path'] = '/opt/gitlab/var/puma/puma.state'
 
Loading
Loading
Loading
Loading
@@ -508,6 +508,7 @@ default['gitlab']['puma']['log_directory'] = "/var/log/gitlab/puma"
default['gitlab']['puma']['listen'] = "127.0.0.1"
default['gitlab']['puma']['port'] = 8080
default['gitlab']['puma']['socket'] = '/var/opt/gitlab/gitlab-rails/sockets/gitlab.socket'
default['gitlab']['puma']['somaxconn'] = 1024
# Path to the puma server Process ID file
# defaults to /opt/gitlab/var/puma/puma.pid. The install-dir path is set at build time
default['gitlab']['puma']['pidfile'] = "#{node['package']['install-dir']}/var/puma/puma.pid"
Loading
Loading
Loading
Loading
@@ -117,3 +117,7 @@ consul_service 'rails' do
port node['gitlab']['puma']['port']
reload_service false unless node['consul']['enable']
end
gitlab_sysctl "net.core.somaxconn" do
value node['gitlab']['puma']['somaxconn']
end
Loading
Loading
@@ -86,6 +86,10 @@ RSpec.describe 'gitlab::puma with Ubuntu 16.04' do
max_threads: 4
)
end
it 'creates sysctl files' do
expect(chef_run).to create_gitlab_sysctl('net.core.somaxconn').with_value(1024)
end
end
 
context 'with custom Puma settings' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment