I’m having trouble getting the Apache >> Configure Modules to work.
As an example …
The default for MPM seems to be mpm_prefork. I’d like to change this to mpm_event
I first tried selecting them both and the Enable Selected to toggle the settings, made no difference.
I then tried to turn “off” mpm_prefork … but it always remains in the “On” position.
Am I doing something wrong here or is this a bug?
maybe you have php7.x module enabled? this always depends on mpm_prefork so it can’t be disabled. you have to disable those 2 , and then enable mpm_event.
could be something else also, you could try console if you’re confortable with :
a2dismod mpm_prefork # check any messages, and act accordingly
a2enmod mpm_event
then, restart apache2…
Dimitrist,
Thank you for the very fast response. I did find this article with a couple of different setups, but to be honest I think I’ll end up with a dead server as it all seems a little iffy. I do have mod_php7.2 loaded (this was a default in Ubuntu 18.04 LTS).
That said, I think the following is a warning that should not go unnoticed. Here is the article I found on why we should all be using mpm_event rather than prefork!
#apache IRC channel and the pros there (from article), They emphatically said DO NOT USE PREFORK ON A PRODUCTION SERVER.
https://serverfault.com/questions/904065/switch-apache-from-prefork-to-event-in-ubuntu-16-get-php-7-working
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
I don’t know if the VirtualMin community has a method of doing this via the VirtualMin interface, I’ve found in the past that manually changing “stuff” can occasionally “confuse” VirtualMin! And being a photographer rather than an IT person, I too get easily confused!
As the server is running OK, I think I’ll let things be for the moment, but a true and tested way of changing over in VirtualMin might be a good solution for everyone.
Dimitrist,
Just a quick note to let you know I did get it working in the end. What an uphill struggle that was (
). I followed a couple of on-line tutorials
Unfortunately I never managed to get mpm_event to work, I always encountered the following error message: " AH00534: apache2: Configuration error: No MPM loaded. ", never solved or found a clue on the internet what was wrong. I then tried mpm_worker - that worked with no issues.
Anyways, thanks again for your help, I suppose looking back a message or two when I first encountered this in Apache Modules would be good, it’s very hard to know what is really going on and what relates to what!
Nigel.