diff --git a/Dockerfiles/web-apache-mysql/alpine/README.md b/Dockerfiles/web-apache-mysql/alpine/README.md index 92b18f985..b7612577b 100644 --- a/Dockerfiles/web-apache-mysql/alpine/README.md +++ b/Dockerfiles/web-apache-mysql/alpine/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-apache-mysql/centos/README.md b/Dockerfiles/web-apache-mysql/centos/README.md index 92b18f985..b7612577b 100644 --- a/Dockerfiles/web-apache-mysql/centos/README.md +++ b/Dockerfiles/web-apache-mysql/centos/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-apache-mysql/centos/conf/etc/php-fpm.d/zabbix.conf b/Dockerfiles/web-apache-mysql/centos/conf/etc/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-apache-mysql/centos/conf/etc/php-fpm.d/zabbix.conf +++ b/Dockerfiles/web-apache-mysql/centos/conf/etc/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh b/Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh index 748f91662..d6a59eb3c 100755 --- a/Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh @@ -146,6 +146,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-apache-mysql/ol/README.md b/Dockerfiles/web-apache-mysql/ol/README.md index 92b18f985..b7612577b 100644 --- a/Dockerfiles/web-apache-mysql/ol/README.md +++ b/Dockerfiles/web-apache-mysql/ol/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-apache-mysql/ol/conf/etc/php-fpm.d/zabbix.conf b/Dockerfiles/web-apache-mysql/ol/conf/etc/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-apache-mysql/ol/conf/etc/php-fpm.d/zabbix.conf +++ b/Dockerfiles/web-apache-mysql/ol/conf/etc/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh b/Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh index 748f91662..d6a59eb3c 100755 --- a/Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh @@ -146,6 +146,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-apache-mysql/ubuntu/README.md b/Dockerfiles/web-apache-mysql/ubuntu/README.md index 92b18f985..b7612577b 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/README.md +++ b/Dockerfiles/web-apache-mysql/ubuntu/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-apache-pgsql/alpine/README.md b/Dockerfiles/web-apache-pgsql/alpine/README.md index 2ea0df51b..d7db31597 100644 --- a/Dockerfiles/web-apache-pgsql/alpine/README.md +++ b/Dockerfiles/web-apache-pgsql/alpine/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-apache-pgsql/centos/README.md b/Dockerfiles/web-apache-pgsql/centos/README.md index 2ea0df51b..d7db31597 100644 --- a/Dockerfiles/web-apache-pgsql/centos/README.md +++ b/Dockerfiles/web-apache-pgsql/centos/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-apache-pgsql/centos/conf/etc/php-fpm.d/zabbix.conf b/Dockerfiles/web-apache-pgsql/centos/conf/etc/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-apache-pgsql/centos/conf/etc/php-fpm.d/zabbix.conf +++ b/Dockerfiles/web-apache-pgsql/centos/conf/etc/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh b/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh index 9a3aff2dc..eab82a752 100755 --- a/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh @@ -145,6 +145,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-apache-pgsql/ol/README.md b/Dockerfiles/web-apache-pgsql/ol/README.md index 2ea0df51b..d7db31597 100644 --- a/Dockerfiles/web-apache-pgsql/ol/README.md +++ b/Dockerfiles/web-apache-pgsql/ol/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-apache-pgsql/ol/conf/etc/php-fpm.d/zabbix.conf b/Dockerfiles/web-apache-pgsql/ol/conf/etc/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-apache-pgsql/ol/conf/etc/php-fpm.d/zabbix.conf +++ b/Dockerfiles/web-apache-pgsql/ol/conf/etc/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh b/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh index 9a3aff2dc..eab82a752 100755 --- a/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh @@ -145,6 +145,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-apache-pgsql/ubuntu/README.md b/Dockerfiles/web-apache-pgsql/ubuntu/README.md index 2ea0df51b..d7db31597 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/README.md +++ b/Dockerfiles/web-apache-pgsql/ubuntu/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-nginx-mysql/alpine/README.md b/Dockerfiles/web-nginx-mysql/alpine/README.md index e1ad21381..a85492ec1 100644 --- a/Dockerfiles/web-nginx-mysql/alpine/README.md +++ b/Dockerfiles/web-nginx-mysql/alpine/README.md @@ -217,6 +217,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-nginx-mysql/alpine/conf/etc/php7/php-fpm.d/zabbix.conf b/Dockerfiles/web-nginx-mysql/alpine/conf/etc/php7/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-nginx-mysql/alpine/conf/etc/php7/php-fpm.d/zabbix.conf +++ b/Dockerfiles/web-nginx-mysql/alpine/conf/etc/php7/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh index ec5a4babe..383fcc75f 100755 --- a/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh @@ -147,6 +147,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php7/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-nginx-mysql/centos/README.md b/Dockerfiles/web-nginx-mysql/centos/README.md index e1ad21381..a85492ec1 100644 --- a/Dockerfiles/web-nginx-mysql/centos/README.md +++ b/Dockerfiles/web-nginx-mysql/centos/README.md @@ -217,6 +217,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-nginx-mysql/centos/conf/etc/php-fpm.d/zabbix.conf b/Dockerfiles/web-nginx-mysql/centos/conf/etc/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-nginx-mysql/centos/conf/etc/php-fpm.d/zabbix.conf +++ b/Dockerfiles/web-nginx-mysql/centos/conf/etc/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh index 4ae3979d5..2a42f4d1b 100755 --- a/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh @@ -147,6 +147,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-nginx-mysql/ol/README.md b/Dockerfiles/web-nginx-mysql/ol/README.md index e1ad21381..a85492ec1 100644 --- a/Dockerfiles/web-nginx-mysql/ol/README.md +++ b/Dockerfiles/web-nginx-mysql/ol/README.md @@ -217,6 +217,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-nginx-mysql/ol/conf/etc/php-fpm.d/zabbix.conf b/Dockerfiles/web-nginx-mysql/ol/conf/etc/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-nginx-mysql/ol/conf/etc/php-fpm.d/zabbix.conf +++ b/Dockerfiles/web-nginx-mysql/ol/conf/etc/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh index 4ae3979d5..2a42f4d1b 100755 --- a/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh @@ -147,6 +147,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-nginx-mysql/rhel/README.md b/Dockerfiles/web-nginx-mysql/rhel/README.md index e1ad21381..a85492ec1 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/README.md +++ b/Dockerfiles/web-nginx-mysql/rhel/README.md @@ -217,6 +217,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-nginx-mysql/rhel/conf/etc/php-fpm.d/zabbix.conf b/Dockerfiles/web-nginx-mysql/rhel/conf/etc/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/conf/etc/php-fpm.d/zabbix.conf +++ b/Dockerfiles/web-nginx-mysql/rhel/conf/etc/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh index cdc07de18..7bfd59d59 100755 --- a/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh @@ -147,6 +147,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/README.md b/Dockerfiles/web-nginx-mysql/ubuntu/README.md index e1ad21381..a85492ec1 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/README.md +++ b/Dockerfiles/web-nginx-mysql/ubuntu/README.md @@ -217,6 +217,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/php/7.4/fpm/pool.d/zabbix.conf b/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/php/7.4/fpm/pool.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/php/7.4/fpm/pool.d/zabbix.conf +++ b/Dockerfiles/web-nginx-mysql/ubuntu/conf/etc/php/7.4/fpm/pool.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh index cb1791a3d..7e3fbfe75 100755 --- a/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh @@ -147,6 +147,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php/7.4/fpm/pool.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-nginx-pgsql/alpine/README.md b/Dockerfiles/web-nginx-pgsql/alpine/README.md index 6a20987a2..d6b086b13 100644 --- a/Dockerfiles/web-nginx-pgsql/alpine/README.md +++ b/Dockerfiles/web-nginx-pgsql/alpine/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/php7/php-fpm.d/zabbix.conf b/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/php7/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/php7/php-fpm.d/zabbix.conf +++ b/Dockerfiles/web-nginx-pgsql/alpine/conf/etc/php7/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh index ce28d62d2..9dce1270a 100755 --- a/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh @@ -146,6 +146,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php7/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-nginx-pgsql/centos/README.md b/Dockerfiles/web-nginx-pgsql/centos/README.md index 6a20987a2..d6b086b13 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/README.md +++ b/Dockerfiles/web-nginx-pgsql/centos/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-nginx-pgsql/centos/conf/etc/php-fpm.d/zabbix.conf b/Dockerfiles/web-nginx-pgsql/centos/conf/etc/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/conf/etc/php-fpm.d/zabbix.conf +++ b/Dockerfiles/web-nginx-pgsql/centos/conf/etc/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh index 3325de3fa..d5138facf 100755 --- a/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh @@ -146,6 +146,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-nginx-pgsql/ol/README.md b/Dockerfiles/web-nginx-pgsql/ol/README.md index 6a20987a2..d6b086b13 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/README.md +++ b/Dockerfiles/web-nginx-pgsql/ol/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-nginx-pgsql/ol/conf/etc/php-fpm.d/zabbix.conf b/Dockerfiles/web-nginx-pgsql/ol/conf/etc/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/conf/etc/php-fpm.d/zabbix.conf +++ b/Dockerfiles/web-nginx-pgsql/ol/conf/etc/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh index 3325de3fa..d5138facf 100755 --- a/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh @@ -146,6 +146,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/README.md b/Dockerfiles/web-nginx-pgsql/ubuntu/README.md index 6a20987a2..d6b086b13 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/README.md +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/README.md @@ -216,6 +216,14 @@ Additionally the image allows to specify many other environment variables listed ZBX_VAULTDBPATH= # Available since 5.2.0 ZBX_VAULTURL=https://127.0.0.1:8200 # Available since 5.2.0 VAULT_TOKEN= # Available since 5.2.0 + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` ## Allowed volumes for the Zabbix web interface container diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/php/7.4/fpm/pool.d/zabbix.conf b/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/php/7.4/fpm/pool.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/php/7.4/fpm/pool.d/zabbix.conf +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/conf/etc/php/7.4/fpm/pool.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh b/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh index 72815e027..15140ce38 100755 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh @@ -146,6 +146,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php/7.4/fpm/pool.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/Dockerfiles/zabbix-appliance/rhel/README.md b/Dockerfiles/zabbix-appliance/rhel/README.md index 4aec58a90..5960168b5 100644 --- a/Dockerfiles/zabbix-appliance/rhel/README.md +++ b/Dockerfiles/zabbix-appliance/rhel/README.md @@ -149,6 +149,14 @@ ZBX_TLSCAFILE= ZBX_TLSCRLFILE= ZBX_TLSCERTFILE= ZBX_TLSKEYFILE= + +Allowed PHP-FPM configuration options: +PHP_FPM_PM=dynamic +PHP_FPM_PM_MAX_CHILDREN=50 +PHP_FPM_PM_START_SERVERS=5 +PHP_FPM_PM_MIN_SPARE_SERVERS=5 +PHP_FPM_PM_MAX_SPARE_SERVERS=35 +PHP_FPM_PM_MAX_REQUESTS=0 ``` Default values of these variables are specified after equal sign. diff --git a/Dockerfiles/zabbix-appliance/rhel/conf/etc/php-fpm.d/zabbix.conf b/Dockerfiles/zabbix-appliance/rhel/conf/etc/php-fpm.d/zabbix.conf index e2d27c28b..a60198594 100644 --- a/Dockerfiles/zabbix-appliance/rhel/conf/etc/php-fpm.d/zabbix.conf +++ b/Dockerfiles/zabbix-appliance/rhel/conf/etc/php-fpm.d/zabbix.conf @@ -4,11 +4,12 @@ listen = /tmp/php-fpm.sock clear_env = no -pm = dynamic -pm.max_children = 50 -pm.start_servers = 5 -pm.min_spare_servers = 5 -pm.max_spare_servers = 35 +pm = ${PHP_FPM_PM} +pm.max_children = ${PHP_FPM_PM_MAX_CHILDREN} +pm.start_servers = ${PHP_FPM_PM_START_SERVERS} +pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS} +pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS} +pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS} slowlog = /dev/fd/1 diff --git a/Dockerfiles/zabbix-appliance/rhel/docker-entrypoint.sh b/Dockerfiles/zabbix-appliance/rhel/docker-entrypoint.sh index f2af5a5d9..1a4e2326c 100755 --- a/Dockerfiles/zabbix-appliance/rhel/docker-entrypoint.sh +++ b/Dockerfiles/zabbix-appliance/rhel/docker-entrypoint.sh @@ -536,6 +536,13 @@ prepare_zbx_web_config() { PHP_CONFIG_FILE="/etc/php-fpm.d/zabbix.conf" + export PHP_FPM_PM=${PHP_FPM_PM:-"dynamic"} + export PHP_FPM_PM_MAX_CHILDREN=${PHP_FPM_PM_MAX_CHILDREN:-"50"} + export PHP_FPM_PM_START_SERVERS=${PHP_FPM_PM_START_SERVERS:-"5"} + export PHP_FPM_PM_MIN_SPARE_SERVERS=${PHP_FPM_PM_MIN_SPARE_SERVERS:-"5"} + export PHP_FPM_PM_MAX_SPARE_SERVERS=${PHP_FPM_PM_MAX_SPARE_SERVERS:-"35"} + export PHP_FPM_PM_MAX_REQUESTS=${PHP_FPM_PM_MAX_REQUESTS:-"0"} + if [ "$(id -u)" == '0' ]; then echo "user = zabbix" >> "$PHP_CONFIG_FILE" echo "group = zabbix" >> "$PHP_CONFIG_FILE" diff --git a/env_vars/.env_web b/env_vars/.env_web index e93a2e5a0..a9d0a59ab 100644 --- a/env_vars/.env_web +++ b/env_vars/.env_web @@ -22,3 +22,10 @@ ZBX_SERVER_NAME=Composed installation # ZBX_DENY_GUI_ACCESS=false # ZBX_GUI_ACCESS_IP_RANGE=['127.0.0.1'] # ZBX_GUI_WARNING_MSG=Zabbix is under maintenance. + +# PHP_FPM_PM=dynamic +# PHP_FPM_PM_MAX_CHILDREN=50 +# PHP_FPM_PM_START_SERVERS=5 +# PHP_FPM_PM_MIN_SPARE_SERVERS=5 +# PHP_FPM_PM_MAX_SPARE_SERVERS=35 +# PHP_FPM_PM_MAX_REQUESTS=0