четверг, 25 октября 2018 г.

debian: php5 + apache2-mpm-worker

Суть в том, что это не работает.
https://serverfault.com/questions/772298/configuring-apache2-mpm-worker-with-php5

Ubuntu's PHP5 module will only work with the single-threaded mpm_prefork. In order to use the Apache module with the threaded mpm_worker, you will need to compile a threadsafe version of PHP yourself (which requires disabling all of the features and modules of PHP that are not threadsafe, which are a lot of them).

Instead of using libapache2-mod-php5 you should consider using FastCGI/php-fpm. There is a guide to the steps needed to install and configure libapache2-mod-fastcgi and php5-fpm here: https://askubuntu.com/a/527227 Part of configuring FPM is to create "pools" of php processes, each of which have their own limits and INI files, so you will need to be sure that the limits in FPM are reasonable for your site's expected load.

This arrangement will allow you to use the multi-threaded worker MPM in Apache while handing off the PHP requests to individual PHP processes handling a single request each.