Php74-php-fpm.service stops but still shown as running

SYSTEM INFORMATION
OS type and version Alma Linux 9.3
Webmin version 2.111

I have installed php-fpm.service and below php74-php-fpm.service, php81-php-fpm.service and php83-php-fpm.service. All are set on “start at boot” = yes and are always shown as “running=yes”.

But from time to time (every few days) the service php74-php-fpm.service is down (but still shown as “running=yes” in System > Bootup and Shutdown). I cannot find any reason or how to fix it. I just restart when the website shows “Service unavailable”.

Any idea anyone?

Look in your php logs - it sounds like you are running a feature that has be depreciated in version 8.x but are trying to run it in 7.x or alternatively running something that is only available in 8.x. So php7.x is stopping.
What php app are you running?
the

sounds like it is some user input in the app that is triggering the event

You should figure this out. However, the simplest work-around for this issue is:

systemctl edit php74-php-fpm.service

…then add:

[Service]
Restart=always
RestartSec=2s
TimeoutSec=10s

… then restart the service:

systemctl restart php74-php-fpm.service

I’d like to point out that this isn’t really a solution, but rather a workaround or a safety measure to ensure your service is always available.

Furthermore, dig into:

thx for the hints, the key is maybe the number of children I allowed for FPM. I now raised the children values, so I will see in the next time if that solved the problem.

remember that too many children can result in the dreaded OOM (Out of Memory) condition that when triggered, results in various processes being killed off – and not just php processes :slight_smile:

1 Like

I run ondemand with these settings I add the template, seems to help memory use.

pm = ondemand
pm.max_children = 40
pm.process_idle_timeout = 10s
pm.max_requests = 200

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.