From 397f814cd2c8f1bd1cd77f8d0b4bdf9107760cca Mon Sep 17 00:00:00 2001 From: Alexey Pustovalov Date: Sat, 26 Feb 2022 23:28:25 +0200 Subject: [PATCH] Added some options for PHP-FPM configuration --- Dockerfiles/web-apache-mysql/alpine/README.md | 8 ++++++++ Dockerfiles/web-apache-mysql/centos/README.md | 8 ++++++++ .../centos/conf/etc/php-fpm.d/zabbix.conf | 11 ++++++----- .../web-apache-mysql/centos/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-apache-mysql/ol/README.md | 8 ++++++++ .../ol/conf/etc/php-fpm.d/zabbix.conf | 11 ++++++----- Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-apache-mysql/ubuntu/README.md | 8 ++++++++ Dockerfiles/web-apache-pgsql/alpine/README.md | 8 ++++++++ Dockerfiles/web-apache-pgsql/centos/README.md | 8 ++++++++ .../centos/conf/etc/php-fpm.d/zabbix.conf | 11 ++++++----- .../web-apache-pgsql/centos/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-apache-pgsql/ol/README.md | 8 ++++++++ .../ol/conf/etc/php-fpm.d/zabbix.conf | 11 ++++++----- Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-apache-pgsql/ubuntu/README.md | 8 ++++++++ Dockerfiles/web-nginx-mysql/alpine/README.md | 8 ++++++++ .../alpine/conf/etc/php7/php-fpm.d/zabbix.conf | 11 ++++++----- .../web-nginx-mysql/alpine/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-nginx-mysql/centos/README.md | 8 ++++++++ .../centos/conf/etc/php-fpm.d/zabbix.conf | 11 ++++++----- .../web-nginx-mysql/centos/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-nginx-mysql/ol/README.md | 8 ++++++++ .../web-nginx-mysql/ol/conf/etc/php-fpm.d/zabbix.conf | 11 ++++++----- Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-nginx-mysql/rhel/README.md | 8 ++++++++ .../rhel/conf/etc/php-fpm.d/zabbix.conf | 11 ++++++----- Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-nginx-mysql/ubuntu/README.md | 8 ++++++++ .../ubuntu/conf/etc/php/7.4/fpm/pool.d/zabbix.conf | 11 ++++++----- .../web-nginx-mysql/ubuntu/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-nginx-pgsql/alpine/README.md | 8 ++++++++ .../alpine/conf/etc/php7/php-fpm.d/zabbix.conf | 11 ++++++----- .../web-nginx-pgsql/alpine/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-nginx-pgsql/centos/README.md | 8 ++++++++ .../centos/conf/etc/php-fpm.d/zabbix.conf | 11 ++++++----- .../web-nginx-pgsql/centos/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-nginx-pgsql/ol/README.md | 8 ++++++++ .../web-nginx-pgsql/ol/conf/etc/php-fpm.d/zabbix.conf | 11 ++++++----- Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh | 7 +++++++ Dockerfiles/web-nginx-pgsql/ubuntu/README.md | 8 ++++++++ .../ubuntu/conf/etc/php/7.4/fpm/pool.d/zabbix.conf | 11 ++++++----- .../web-nginx-pgsql/ubuntu/docker-entrypoint.sh | 7 +++++++ Dockerfiles/zabbix-appliance/rhel/README.md | 8 ++++++++ .../rhel/conf/etc/php-fpm.d/zabbix.conf | 11 ++++++----- .../zabbix-appliance/rhel/docker-entrypoint.sh | 7 +++++++ env_vars/.env_web | 7 +++++++ 47 files changed, 333 insertions(+), 70 deletions(-) diff --git a/Dockerfiles/web-apache-mysql/alpine/README.md b/Dockerfiles/web-apache-mysql/alpine/README.md index e2e774ab1..d5b4d13fb 100644 --- a/Dockerfiles/web-apache-mysql/alpine/README.md +++ b/Dockerfiles/web-apache-mysql/alpine/README.md @@ -218,6 +218,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 e2e774ab1..d5b4d13fb 100644 --- a/Dockerfiles/web-apache-mysql/centos/README.md +++ b/Dockerfiles/web-apache-mysql/centos/README.md @@ -218,6 +218,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 fd6b7d4c8..924618b44 100755 --- a/Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-mysql/centos/docker-entrypoint.sh @@ -144,6 +144,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 e2e774ab1..d5b4d13fb 100644 --- a/Dockerfiles/web-apache-mysql/ol/README.md +++ b/Dockerfiles/web-apache-mysql/ol/README.md @@ -218,6 +218,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 fd6b7d4c8..924618b44 100755 --- a/Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-mysql/ol/docker-entrypoint.sh @@ -144,6 +144,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 e2e774ab1..d5b4d13fb 100644 --- a/Dockerfiles/web-apache-mysql/ubuntu/README.md +++ b/Dockerfiles/web-apache-mysql/ubuntu/README.md @@ -218,6 +218,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 1d2599312..dc51fb2ae 100644 --- a/Dockerfiles/web-apache-pgsql/alpine/README.md +++ b/Dockerfiles/web-apache-pgsql/alpine/README.md @@ -218,6 +218,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 1d2599312..dc51fb2ae 100644 --- a/Dockerfiles/web-apache-pgsql/centos/README.md +++ b/Dockerfiles/web-apache-pgsql/centos/README.md @@ -218,6 +218,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 ff63887e3..519a4bc8b 100755 --- a/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/centos/docker-entrypoint.sh @@ -143,6 +143,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 1d2599312..dc51fb2ae 100644 --- a/Dockerfiles/web-apache-pgsql/ol/README.md +++ b/Dockerfiles/web-apache-pgsql/ol/README.md @@ -218,6 +218,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 ff63887e3..519a4bc8b 100755 --- a/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-apache-pgsql/ol/docker-entrypoint.sh @@ -143,6 +143,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 1d2599312..dc51fb2ae 100644 --- a/Dockerfiles/web-apache-pgsql/ubuntu/README.md +++ b/Dockerfiles/web-apache-pgsql/ubuntu/README.md @@ -218,6 +218,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 cc08161d1..0421547af 100644 --- a/Dockerfiles/web-nginx-mysql/alpine/README.md +++ b/Dockerfiles/web-nginx-mysql/alpine/README.md @@ -219,6 +219,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 a51300cc6..7086cffa0 100755 --- a/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/alpine/docker-entrypoint.sh @@ -145,6 +145,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 cc08161d1..0421547af 100644 --- a/Dockerfiles/web-nginx-mysql/centos/README.md +++ b/Dockerfiles/web-nginx-mysql/centos/README.md @@ -219,6 +219,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 e10775bc8..5d0c7e1db 100755 --- a/Dockerfiles/web-nginx-mysql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/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-nginx-mysql/ol/README.md b/Dockerfiles/web-nginx-mysql/ol/README.md index cc08161d1..0421547af 100644 --- a/Dockerfiles/web-nginx-mysql/ol/README.md +++ b/Dockerfiles/web-nginx-mysql/ol/README.md @@ -219,6 +219,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 e10775bc8..5d0c7e1db 100755 --- a/Dockerfiles/web-nginx-mysql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/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-nginx-mysql/rhel/README.md b/Dockerfiles/web-nginx-mysql/rhel/README.md index cc08161d1..0421547af 100644 --- a/Dockerfiles/web-nginx-mysql/rhel/README.md +++ b/Dockerfiles/web-nginx-mysql/rhel/README.md @@ -219,6 +219,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 c16b3a975..cb7303711 100755 --- a/Dockerfiles/web-nginx-mysql/rhel/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/rhel/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-nginx-mysql/ubuntu/README.md b/Dockerfiles/web-nginx-mysql/ubuntu/README.md index cc08161d1..0421547af 100644 --- a/Dockerfiles/web-nginx-mysql/ubuntu/README.md +++ b/Dockerfiles/web-nginx-mysql/ubuntu/README.md @@ -219,6 +219,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 cfa406eb5..2faf6325f 100755 --- a/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-mysql/ubuntu/docker-entrypoint.sh @@ -145,6 +145,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 e325f19e3..40db6f52f 100644 --- a/Dockerfiles/web-nginx-pgsql/alpine/README.md +++ b/Dockerfiles/web-nginx-pgsql/alpine/README.md @@ -218,6 +218,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 2d805d0dd..acfe0619a 100755 --- a/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/alpine/docker-entrypoint.sh @@ -144,6 +144,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 e325f19e3..40db6f52f 100644 --- a/Dockerfiles/web-nginx-pgsql/centos/README.md +++ b/Dockerfiles/web-nginx-pgsql/centos/README.md @@ -218,6 +218,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 9b71bfd99..67656445a 100755 --- a/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/centos/docker-entrypoint.sh @@ -144,6 +144,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 e325f19e3..40db6f52f 100644 --- a/Dockerfiles/web-nginx-pgsql/ol/README.md +++ b/Dockerfiles/web-nginx-pgsql/ol/README.md @@ -218,6 +218,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 9b71bfd99..67656445a 100755 --- a/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/ol/docker-entrypoint.sh @@ -144,6 +144,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 e325f19e3..40db6f52f 100644 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/README.md +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/README.md @@ -218,6 +218,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 d228146d9..1aa2d48ae 100755 --- a/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh +++ b/Dockerfiles/web-nginx-pgsql/ubuntu/docker-entrypoint.sh @@ -144,6 +144,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 0ad051716..f377f1aa5 100644 --- a/Dockerfiles/zabbix-appliance/rhel/README.md +++ b/Dockerfiles/zabbix-appliance/rhel/README.md @@ -148,6 +148,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 070cf10b1..b4ccb16ee 100755 --- a/Dockerfiles/zabbix-appliance/rhel/docker-entrypoint.sh +++ b/Dockerfiles/zabbix-appliance/rhel/docker-entrypoint.sh @@ -547,6 +547,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 155e7f58f..fc0acde0f 100644 --- a/env_vars/.env_web +++ b/env_vars/.env_web @@ -25,3 +25,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