fix: use pm=dynamic (medium) for PHP-FPM to avoid cold-start latency

The default footprint=low sets pm=ondemand with process_idle_timeout=10s,
which kills all PHP-FPM workers after 10 seconds of inactivity. Invoice
Ninja generates PDFs via headless Chromium (snappdf); with ondemand, every
PDF request after a brief idle period suffers a combined PHP-FPM worker
spawn + OPcache warm-up (~3-4s) on top of Chromium cold-start (~4-5s),
resulting in 10-12s for the first PDF after idle.

footprint=medium sets pm=dynamic with at least one warm worker kept alive,
reducing PDF latency to the Chromium baseline (~4-5s) regardless of idle time.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-07-07 21:42:01 +02:00
parent 2fd634c2c0
commit 1fa914bbdc
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ ynh_config_add --template="default.env" --destination="$install_dir/.env"
ynh_script_progression "Adding system configurations related to $app..." ynh_script_progression "Adding system configurations related to $app..."
# Create a PHP-FPM config (with conf/extra_php-fpm.conf being appended to it) # Create a PHP-FPM config (with conf/extra_php-fpm.conf being appended to it)
ynh_config_add_phpfpm ynh_config_add_phpfpm --usage=medium
# Create a dedicated NGINX config using the conf/nginx.conf template # Create a dedicated NGINX config using the conf/nginx.conf template
ynh_config_add_nginx ynh_config_add_nginx
+1 -1
View File
@@ -53,7 +53,7 @@ ynh_config_add --template="default.env" --destination="$install_dir/.env"
#================================================= #=================================================
ynh_script_progression "Upgrading system configurations related to $app..." ynh_script_progression "Upgrading system configurations related to $app..."
ynh_config_add_phpfpm ynh_config_add_phpfpm --usage=medium
ynh_config_add_nginx ynh_config_add_nginx