3 months ago
Hello Railway Support,
I’m having an issue with the official phpMyAdmin template.
Until yesterday, the service was deploying and running correctly. Without any changes on my side, new deploys now fail with the following error:
AH00534: apache2: Configuration error: More than one MPM loaded.
Key points:
I’m using the phpMyAdmin template provided by Railway.
No Dockerfile or custom image is used.
I only have access to environment variables and Start / Pre-Deploy commands.
The error happens during container startup, before phpMyAdmin becomes available.
I briefly enabled serverless for this service; after disabling it, the issue persists.
Re-deploying and attempting to override the Start Command triggers UI errors (“Failed to fetch”), so I can’t reliably apply a workaround.
This looks like the template is enabling multiple Apache MPMs (e.g. mpm_event and mpm_prefork) at the same time, possibly due to a recent change in the base image or runtime.
Could you please:
Confirm whether the phpMyAdmin template was recently updated, or
Advise the correct way to force a single Apache MPM in this template, or
Reset / redeploy the service with a clean, known-good configuration?
Thanks in advance for your help.
Best regards,
Sebastián
4 Replies
3 months ago
Hey Sebastián! This "More than one MPM loaded" error usually means Apache is trying to load multiple Multi-Processing Modules simultaneously, which wasn't happening yesterday. Since you're using Railway's official phpMyAdmin template without any custom changes, this suggests something changed upstream in the base image or template configuration. The fact that you can't override the Start Command (getting "Failed to fetch" errors) makes this trickier to work around. Your best bet is to try redeploying from a fresh template instance or checking if Railway updated the phpMyAdmin template recently. As a workaround, if you can access the Pre-Deploy command, you could try running a2dismod mpm_event or a2dismod mpm_prefork to disable one of the conflicting MPMs before Apache starts, though this depends on what the container allows. Have you tried completely removing the service and redeploying from the template marketplace? Sometimes a fresh deployment picks up the correct configuration. Also yeah worth checking with Railway
3 months ago
Can you try check your environment variables of the services to make sure they point to the right services. Also some services have recent MPM patches.
3 months ago
could you solve it?
2 months ago
Runtime fix for Apache MPM conflicts:
Apache allows only one MPM (Multi-Processing Module) to be loaded at a time. Some environments may end up with multiple MPMs enabled (e.g. mpm_event + mpm_prefork), which causes Apache to fail at startup.
This command ensures that only mpm_prefork (required by mod_php) is enabled by disabling other MPMs and removing leftover symlinks before starting Apache.
Paste at the end of the dockerfile:
CMD ["bash", "-lc", "\ set -eux; \ a2dismod mpm_event mpm_worker || true; \ rm -f /etc/apache2/mods-enabled/mpm_event.* /etc/apache2/mods-enabled/mpm_worker.* || true; \ a2enmod mpm_prefork; \ apache2ctl -t; \ exec apache2-foreground \ "]