Skip to content

Commit 85d25cb

Browse files
authored
Tune Number of File Descriptors (#10)
Signed-off-by: Julien Pivotto <[email protected]>
2 parents 60f7e1a + 826a2d0 commit 85d25cb

File tree

4 files changed

+4
-0
lines changed

4 files changed

+4
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ All variables which can be overridden are stored in [defaults/main.yml](defaults
2626
| `cortex_interface` | "{{ ansible_default_ipv4.interface }}" | Network adapter that cortex will be using |
2727
| `cortex_config_dir` | "/etc/cortex" | Default directory for the cortex config |
2828
| `cortex_db_dir` | "/var/lib/cortex" | Path to the directory of the Cortex database |
29+
| `cortex_limit_nofile` | 10240 | Number of File Descriptors allowed for Cortex processes |
2930
| `cortex_system_user` | "cortex" | Default Cortex user |
3031
| `cortex_system_group` | "cortex" | Default Cortex group |
3132
| `cortex_version` | "1.6.0" | The cortex package version |

defaults/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ cortex_all_in_one: true
55
cortex_web_listen_address: "0.0.0.0:9009"
66
cortex_binary_local_dir: ''
77
cortex_skip_install: false
8+
cortex_limit_nofile: 10240
89

910
cortex_services: {}
1011

templates/cortex.service.j2

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ExecReload=/bin/kill -HUP $MAINPID
1414
ExecStart={{ _cortex_binary_install_dir }}/cortex-linux-amd64 -config.file={{ cortex_config_dir }}/cortex.yml
1515
WorkingDirectory={{ cortex_db_dir }}
1616
SyslogIdentifier={{ cortex_system_user }}
17+
LimitNOFILE={{ cortex_limit_nofile }}
1718
Restart=always
1819
RestartSec=5
1920

templates/[email protected]

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ ExecReload=/bin/kill -HUP $MAINPID
1414
ExecStart={{ _cortex_binary_install_dir }}/cortex-linux-amd64 -config.file={{ cortex_config_dir }}/cortex-%i.yml
1515
WorkingDirectory={{ cortex_db_dir }}
1616
SyslogIdentifier={{ cortex_system_user }}
17+
LimitNOFILE={{ cortex_limit_nofile }}
1718
Restart=always
1819
RestartSec=5
1920

0 commit comments

Comments
 (0)