fix: php-fpm config — non-root user, sane pm defaults#109
Merged
jorge07 merged 1 commit intojorge07:masterfrom Feb 21, 2026
Merged
fix: php-fpm config — non-root user, sane pm defaults#109jorge07 merged 1 commit intojorge07:masterfrom
jorge07 merged 1 commit intojorge07:masterfrom
Conversation
- user/group: root -> nobody (security hardening) - pm.max_children: 500 -> 20 (500 * ~40MB = 20GB, unreasonable default) - pm.start_servers: 60 -> 4 - pm.min_spare_servers: 25 -> 2 - pm.max_spare_servers: 100 -> 10 - Add comment guiding operators to tune pm values for their workload Source: https://www.php.net/manual/en/install.fpm.configuration.php
4d913e3 to
7971e0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hardens PHP-FPM configuration across 8.1, 8.2, 8.3.
Changes:
user/group:root→nobody— running FPM as root is a security riskpm.max_children: 500 → 20 — 500 workers × ~40MB = 20GB RAM; unreasonable image defaultpm.start_servers: 60 → 4pm.min_spare_servers: 25 → 2pm.max_spare_servers: 100 → 10These are conservative defaults. Operators should tune
pm.*for their actual workload.Source: https://www.php.net/manual/en/install.fpm.configuration.php
Part of phase 2+3 modernisation.