Skip to content

Move to PHP-FPM for LAMP/LAPP apps. #1889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
JedMeister opened this issue Jan 12, 2024 · 1 comment
Open

Move to PHP-FPM for LAMP/LAPP apps. #1889

JedMeister opened this issue Jan 12, 2024 · 1 comment
Labels
feature lamp lapp transition-blocker a bug/feature request that is blocking a milestone release
Milestone

Comments

@JedMeister
Copy link
Member

JedMeister commented Jan 12, 2024

Regardless of which webserver we use (as discussed in #1582 - i.e .even if we decide to stick with Apache) we should definitely move to PHP-FPM for PHP apps (i.e. current LAMP/LAPP based apps). I note that (even) the Apache wiki says (my bold italics):

Using proxy_fcgi and php-fpm (for 2.4)

This method is preferred above all other recipes, and is suitable for versions 2.4 and newer. Not only it allows you to discern and diagnose problems related to PHP more quickly, but also you will be able to use a faster and more scalable threaded mpm such as event or worker, which will significantly reduce the memory footprint of your httpd server.

And regarding mod_php (again, my bold italics):

Why you shouldn't use mod_php with the prefork mpm anymore

  • mod_php is loaded into every httpd process all the time. Even when httpd is serving static/non php content, that memory is in use.
  • mod_php is not thread safe and forces you to stick with the prefork mpm (multi process, no threads), which is the slowest possible configuration

So moving to PHP-FPM seems like a no brainer.

I'm pinning this to the the v19.0 milestone as a significant change such as this is best done in a point oh release.

FWIW there is a WordPress PR that switches to PHP-FPM. Whilst that should work fine (merge conflict aside), better would be to update common to provide PHP-FPM by default - i.e. in mk/turnkey/lamp.mk and mk/turnkey/lapp.mk and the lamp and lapp plans.

@JedMeister JedMeister added feature lamp transition-blocker a bug/feature request that is blocking a milestone release labels Jan 12, 2024
@JedMeister JedMeister added this to the 19.0 milestone Jan 12, 2024
@JedMeister JedMeister changed the title Move to PHP-FPM for LAMP/PHP apps. Move to PHP-FPM for LAMP/LAPP apps. Jan 12, 2024
@a3s7p
Copy link
Member

a3s7p commented Jan 13, 2024

100% on board with this. ideal would be to have everything run on nginx+php-fpm but php-fpm alone would be good too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature lamp lapp transition-blocker a bug/feature request that is blocking a milestone release
Projects
None yet
Development

No branches or pull requests

2 participants