Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added pm.max_requests to pool #486

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ pm.min_spare_servers = ${PHP_FPM_PM_MIN_SPARE_SERVERS}
; Note: Mandatory when pm is set to 'dynamic'
pm.max_spare_servers = ${PHP_FPM_PM_MAX_SPARE_SERVERS}

pm.max_requests = ${PHP_FPM_PM_MAX_REQUESTS}

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Healthcheck settings
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Expand Down Expand Up @@ -259,4 +261,4 @@ ping.path = /healthcheck
; This directive may be used to customize the response of a ping request. The
; response is formatted as text/plain with a 200 response code.
; Default Value: pong
ping.response = OK
ping.response = OK
3 changes: 2 additions & 1 deletion src/variations/fpm-apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ ENV APACHE_DOCUMENT_ROOT=/var/www/html/public \
PHP_FPM_PM_MAX_SPARE_SERVERS="3" \
PHP_FPM_PM_MIN_SPARE_SERVERS="1" \
PHP_FPM_PM_START_SERVERS="2" \
PHP_FPM_PM_MAX_REQUESTS="1000" \
PHP_FPM_POOL_NAME="www" \
PHP_FPM_PROCESS_CONTROL_TIMEOUT="10s" \
PHP_MAX_EXECUTION_TIME="99" \
Expand Down Expand Up @@ -159,4 +160,4 @@ WORKDIR ${APP_BASE_DIR}
CMD ["/init"]

HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
CMD [ "sh", "-c", "curl --insecure --silent --location --show-error --fail http://localhost:8080$HEALTHCHECK_PATH || exit 1" ]
CMD [ "sh", "-c", "curl --insecure --silent --location --show-error --fail http://localhost:8080$HEALTHCHECK_PATH || exit 1" ]
3 changes: 2 additions & 1 deletion src/variations/fpm-nginx/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ ENV APP_BASE_DIR=/var/www/html \
PHP_FPM_PM_MAX_SPARE_SERVERS="3" \
PHP_FPM_PM_MIN_SPARE_SERVERS="1" \
PHP_FPM_PM_START_SERVERS="2" \
PHP_FPM_PM_MAX_REQUESTS="1000" \
PHP_FPM_POOL_NAME="www" \
PHP_FPM_PROCESS_CONTROL_TIMEOUT="10s" \
PHP_MAX_EXECUTION_TIME="99" \
Expand Down Expand Up @@ -187,4 +188,4 @@ WORKDIR ${APP_BASE_DIR}
CMD ["/init"]

HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
CMD [ "sh", "-c", "curl --insecure --silent --location --show-error --fail http://localhost:8080$HEALTHCHECK_PATH || exit 1" ]
CMD [ "sh", "-c", "curl --insecure --silent --location --show-error --fail http://localhost:8080$HEALTHCHECK_PATH || exit 1" ]
3 changes: 2 additions & 1 deletion src/variations/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ ENV APP_BASE_DIR=/var/www/html \
PHP_FPM_PM_MAX_SPARE_SERVERS="3" \
PHP_FPM_PM_MIN_SPARE_SERVERS="1" \
PHP_FPM_PM_START_SERVERS="2" \
PHP_FPM_PM_MAX_REQUESTS="1000" \
PHP_FPM_POOL_NAME="www" \
PHP_FPM_PROCESS_CONTROL_TIMEOUT="10s" \
PHP_MAX_EXECUTION_TIME="99" \
Expand Down Expand Up @@ -100,4 +101,4 @@ USER www-data
CMD ["php-fpm"]

HEALTHCHECK --interval=5s --timeout=3s --retries=3 \
CMD php-fpm-healthcheck || exit 1
CMD php-fpm-healthcheck || exit 1