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.
Description of your patch
This patch provides several improvements for PHP-FPM and fixes several issues.
Improvement:
YT-CC-939: Now we create separate PHP-FPM process for each application using new openRC script, it allows us to restart each application separately.
Fixes for issues:
YT-CC-887: PHP started as root cannot be restarted. We are adding user to the PHP-FPM application init script, and now it will be set to deployment user even if root user will start/restart it.
YT-CC-985: Application warning user/group directives are ignored when FPM is not running as root on PHP-FPM start or restart. We have removed user/group directives from pool configuration, because now we run main worker as a deployment user.
Recommended Release Notes
Improvements:
Fixes for issues:
Estimated risk
High. If something goes wrong PHP application will be stopped.
Components involved
PHP-FPM
Description of testing done
See QA instructions - tests were done on a solo environment.
QA Instructions
Boot a cluster environment on the latest V5 (not QA) stack, running the Passenger5 stack. Use simple PHP application for the test.
Review the current behavior
monit summary | grep php-fpm
Upgrade to the QA stack (js_php-fpm_improvements-v5-0.2)
After the upgrade, test the new behavior, following the same procedure as above:
monit summary
ps fauxx | grep php-fpm
. Ensure main PHP-FPM process runs as a deploy user.monit stop php-fpm-<APPLICATION_NAME>
sudo monit start php-fpm-<APPLICATION_NAME>
ps fauxx | grep php-fpm
. Ensure PHP-FPM process still running as a deploy user.monit summary
. Ensure you have additional monit process (php-fpm-<YOUR_APPLICATION_2>) configured and in "Running" state.