Do not limit service by default

This commit is contained in:
phil 2023-11-01 08:08:21 +01:00
parent 90de9d5861
commit 6c6227919d
6 changed files with 8 additions and 6 deletions

View file

@ -3,10 +3,6 @@ php_fpm_log_dir: /var/log/phpfpm
php_fpm_pool_dir: "/etc/php/{{ php_version.stdout }}/fpm/pool.d"
php_fpm_pool_config_file: "{{ php_fpm_pool_dir }}/%i.cfg"
php_fpm_cpu_quota: "100%"
php_fpm_memory_high: "25%"
php_fpm_memory_max: "35%"
apache_php_module_name: "libapache2-mod-php{{ php_version.stdout }}"
php_fpm_config:

View file

@ -21,7 +21,7 @@
- name: "PHP | Copy template for PHP-FPM systemd service and socket"
ansible.builtin.template:
src: "systemd/{{ item }}"
src: "systemd/{{ item }}.j2"
dest: "/etc/systemd/system/{{ item }}"
mode: "0644"
loop:

View file

@ -24,7 +24,7 @@
# Don't override local changes
- name: "User | Create PHP-FPM pool"
ansible.builtin.template:
src: fpmpool.cfg
src: fpmpool.cfg.j2
dest: "/etc/php/{{ php_version.stdout }}/fpm/pool.d/{{ php_user }}.cfg"
force: false
mode: "0644"

View file

@ -41,9 +41,15 @@ SystemCallErrorNumber=EPERM
SystemCallFilter=@system-service
# Resources
{% if php_fpm_cpu_quota is defined %}
CPUQuota={{ php_fpm_cpu_quota }}
{% endif %}
{% if php_fpm_memory_high is defined %}
MemoryHigh={{ php_fpm_memory_high }}
{% endif %}
{% if php_fpm_memory_max is defined %}
MemoryMax={{ php_fpm_memory_max }}
{% endif %}
[Install]
WantedBy=multi-user.target