Add possibility to change ulimit for Apache
Some checks failed
continuous-integration/drone/pr Build is failing

cf. https://wiki.evolix.org/HowtoApache#too-many-open-files
This commit is contained in:
Mathieu Trossevin 2020-10-20 14:15:38 +02:00
parent c8d4da532f
commit 8b7d8676fd
Signed by: mtrossevin
GPG key ID: D1DBB7EA828374E9
2 changed files with 14 additions and 0 deletions

View file

@ -14,6 +14,10 @@ apache_evolinux_default_ssl_key: /etc/ssl/private/ssl-cert-snakeoil.key
apache_serverstatus_suffix: ""
apache_serverstatus_suffix_file: "/etc/evolinux/apache_serverstatus_suffix"
# Change Apache's ulimit through APACHE_ULIMIT_MAX_FILES
apache_change_ulimit: True
apache_ulimit_max: '65536'
apache_log2mail_include: True
apache_munin_include: True

View file

@ -137,6 +137,16 @@
tags:
- apache
- name: Add line in envvars for ulimit
lineinfile:
path: /etc/apache2/envvars
regexp: '^#?APACHE_ULIMIT_MAX_FILES='
line: "APACHE_ULIMIT_MAX_FILES='ulimit -n {{ apache_ulimit_max }}'"
when: apache_change_ulimit
notify: 'restart apache'
tags:
- apache
- include_role:
name: evolix/remount-usr
tags: