mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-06-01 08:20:10 +00:00
refactor: move request_terminate_timeout to Dockerfile; remove 502 docs section
- Remove request_terminate_timeout sed from start.sh (was runtime-dynamic) - Add request_terminate_timeout sed to Dockerfile alongside pm.process_idle_timeout so it is baked into the image permanently at build time - Remove the 502 Bad Gateway troubleshooting subsection from reverse-proxy.md Agent-Logs-Url: https://github.com/nextcloud/all-in-one/sessions/bc8a9920-0b43-4645-9591-180fa8783767 Co-authored-by: szaimen <42591237+szaimen@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2bc3c4e7ec
commit
ffd9dd2da8
@@ -258,6 +258,13 @@ RUN set -ex; \
|
||||
# produce a 502. 300 s (5 min) keeps a warm pool through normal sync-client
|
||||
# polling cycles while still reclaiming memory during genuinely idle periods.
|
||||
sed -i 's/^;*pm.process_idle_timeout\s*=.*/pm.process_idle_timeout = 300s/' /usr/local/etc/php-fpm.d/www.conf; \
|
||||
# Set request_terminate_timeout so that PHP-FPM forcibly kills workers that
|
||||
# exceed the wall-clock limit. Without this (default = 0 = disabled) a worker
|
||||
# stuck on a slow DB query, a stalled Redis connection, or a hung syscall is
|
||||
# never reaped. Over time these zombies fill up pm.max_children, leaving no
|
||||
# free slots for legitimate requests and causing Apache to return 502 Bad
|
||||
# Gateway upstream.
|
||||
sed -i "s|^;*request_terminate_timeout = .*|request_terminate_timeout = ${PHP_MAX_TIME}|" /usr/local/etc/php-fpm.d/www.conf; \
|
||||
sed -i 's|access.log = /proc/self/fd/2|access.log = /proc/self/fd/1|' /usr/local/etc/php-fpm.d/docker.conf; \
|
||||
\
|
||||
echo "[ -n \"\$TERM\" ] && [ -f /root.motd ] && cat /root.motd" >> /root/.bashrc; \
|
||||
|
||||
@@ -156,15 +156,6 @@ while [ "$THIS_IS_AIO" = "true" ] && [ -z "$(dig nextcloud-aio-apache A +short +
|
||||
sleep 5
|
||||
done
|
||||
|
||||
# Set request_terminate_timeout so that PHP-FPM forcibly kills workers that
|
||||
# exceed the wall-clock limit. Without this (default = 0 = disabled) a worker
|
||||
# stuck on a slow DB query, a stalled Redis connection, or a hung syscall is
|
||||
# never reaped. Over time these zombies fill up pm.max_children, leaving no
|
||||
# free slots for legitimate requests and causing Apache to return 502 Bad
|
||||
# Gateway upstream. Setting it equal to PHP_MAX_TIME means a worker lives at
|
||||
# most as long as a PHP script is allowed to run, which keeps the pool healthy.
|
||||
sed -i "s|^;*request_terminate_timeout = .*|request_terminate_timeout = ${PHP_MAX_TIME}|" /usr/local/etc/php-fpm.d/www.conf
|
||||
|
||||
set -x
|
||||
# shellcheck disable=SC2235
|
||||
if [ "$THIS_IS_AIO" = "true" ] && [ "$APACHE_PORT" = 443 ]; then
|
||||
|
||||
Reference in New Issue
Block a user