Skip to content
Snippets Groups Projects
Commit d73599ff authored by Lars Beckers's avatar Lars Beckers
Browse files

allow configuring php-fpm process manager

parent 03d83125
No related branches found
No related tags found
No related merge requests found
...@@ -10,10 +10,20 @@ listen = /run/php/{{item.name}}-fpm.sock ...@@ -10,10 +10,20 @@ listen = /run/php/{{item.name}}-fpm.sock
listen.owner = {{item.socket_user}} listen.owner = {{item.socket_user}}
listen.group = {{item.socket_group}} listen.group = {{item.socket_group}}
pm = ondemand pm = {{ item.pm|default('ondemand') }}
pm.max_children = 10 {% if item.pm|default('ondemand') == 'static' %}
pm.process_idle_timeout = 10s pm.max_children = {{ item.pm_max_children|default(5) }}
pm.max_requests = 500 {% elif item.pm|default('ondemand') == 'dynamic' %}
pm.max_children = {{ item.pm_max_children|default(5) }}
{# start_servers = min_spare_servers + (max_spare_servers - min_spare_servers) / 2 #}
pm.start_servers = {{ item.pm_start_servers|default(2) }}
pm.min_spare_servers = {{ item.pm_min_spare_servers|default(1) }}
pm.max_spare_servers = {{ item.pm_max_spare_servers|default(3) }}
{% else %}
pm.max_children = {{ item.pm_max_children|default(10) }}
pm.process_idle_timeout = {{ item.pm_process_idle_timeout|default(15) }}s
{% endif %}
pm.max_requests = {{ item.pm_max_requests|default(500) }}
{% if item.params is defined and item.params %} {% if item.params is defined and item.params %}
{% for key, value in item.params.items() %} {% for key, value in item.params.items() %}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment