OpenRailwayMap / server-admin

Issue tracker for admin stuff related to openrailwaymap.org instance.
4 stars 2 forks source link

Use php-fpm instead of mod_php #21

Closed mmoll closed 3 years ago

mmoll commented 3 years ago

This is switching the PHP integration from mod_php to php-fpm and allows to use Apache's event MPM.

The switch on an existing installation:

dpkg --purge libapache2-mod-php libapache2-mod-php7.3
apt -y install php-fpm
a2enmod proxy_fcgi setenvif
a2enconf php7.3-fpm
a2dismod mpm_prefork
a2enmod mpm_event
rm /etc/apache2/conf-enabled/max_request_workers.conf
systemctl restart apache2

The tuning of Apache and FPM pool parameters is missing here, as I have no idea about the actual profile of the production instance, so I'll leave that to upstream.

Nakaner commented 3 years ago

Thank you for the pull request.

I did some further configuration in commit https://github.com/OpenRailwayMap/server-admin/commit/5b8fdc04d386563022fab5fdf845626e5174856d. Let's see how good it runs when we have full load tomorrow (starting around 11:00 UTC).