stable

Clone or download

Read-only

Deploy a dedicated PHP FPM pool to deal with long running requests

In 36981ab17eb577033830c593ff2ef2a23098b7ff some specific PHP parameters have been passed to PHP FPM to deal with large POST request without hitting the PHP memory limit. This is achieved by disabling the population of the $_POST and $_FILES variables. Unfortunately, when setting a PHP_VALUE via fastcgi_param in the nginx configuration this PHP value is not reset to the default value between requests. This means that the PHP FPM child process will keep the configuration dedicated to the uploads for all other requests breaking Tuleap. To avoid this, a new PHP FPM pool is deployed to deal with the long running requests. This approach is also interesting because even if there is a lot of uploads and we have reached the maximum capacity, the rest of Tuleap can continue to work. Administrators will needs to a few manual actions: - redeploy nginx and PHP FPM configurations (/usr/share/tuleap/tools/utils/php73/run.php --module=nginx,fpm) - restart nginx and PHP FPM - update /etc/nginx/conf.d/tuleap.conf to replace the current upstream block by: upstream tuleap-apache { server 127.0.0.1:8080; } upstream tuleap-php-fpm { server 127.0.0.1:9000; } upstream tuleap-php-fpm-long-running-request { server 127.0.0.1:9002; } The manual change to the nginx configuration could be avoided but that would force us to hardcode the address of the new PHP FPM pool in a configuration file automatically redeployed by Tuleap. This is not great if for whatever reason the port 9002/TCP is already used on the server. Part of request #13492: Improve TUS implementation to support client unable to use PATCH Change-Id: I71c8270cdbf8959c20dd88b41f36b21f77b2ff88

Modified Files

Name
M plugins/git/etc/nginx/git.conf +1 −1 Go to diff View file
M plugins/mediawiki/etc/nginx/mediawiki.conf +1 −1 Go to diff View file
M plugins/pullrequest/etc/nginx/pullrequest.conf +1 −1 Go to diff View file
M plugins/statistics/etc/nginx/statistics.conf +1 −1 Go to diff View file
M plugins/svn/etc/nginx/svn.conf +1 −1 Go to diff View file
D src/etc/fpm.conf.dist +0 −20 Go to diff View file
A src/etc/fpm72/tuleap-long-running-request.conf +33 −0 Go to diff View file
A src/etc/fpm73/tuleap-long-running-request.conf +33 −0 Go to diff View file
M src/etc/nginx/plugin.conf.dist +1 −1 Go to diff View file
M src/etc/nginx/tuleap.conf.dist +9 −1 Go to diff View file
M src/etc/nginx/tuleap.d/03-locations.conf +1 −1 Go to diff View file
M src/etc/nginx/tuleap.d/06-svn.conf +1 −1 Go to diff View file
M src/etc/nginx/tuleap.d/07-mailman.conf +1 −1 Go to diff View file
M src/etc/nginx/tuleap.d/08-uploads.conf +1 −5 Go to diff View file
M tools/Configuration/FPM/TuleapWeb.php +19 −15 Go to diff View file