The php service is down several times a day

The php service is down several times a day.
When the service goes down I have to start the service manually and it works immediately. Then minutes, hours can pass and it falls again.

Can you help me find my problem?

I have version 1.6.9 of Hestia Panel and it has happened to me with php8.1-fpm and php7.4-fpm which I use.

Operating System: Ubuntu 22.04 (x86_64)
Server: vps 300 contabo

As an annex, the service that I always have down but at the moment it is not a problem is clamav-daemon.

Please your help,

I think it would be nice to see the logs. Most likely there is an answer why the service stops.

1 Like

Hello!

It happens that the logs are not registering the service falls, if when I start them manually. I have reviewed them before consulting here.

I think the problem is that I only have 4 GB of ram and the server runs out of memory and kills the service.

However, it would be ideal for the hestia panel logs to record these failures.

Anyway thanks for answering.

Its not hestia which is in charge, hestia just combines different, already existing services - if php fpm doesnt log the crash, we cant change anything - because its php fpm, so you would need to reach out to php.net.

Usualy memory limit should not directly kill a service, it should start to use the swap (and getting slow).

Have a look at the logs again, maybe syslog contains some informations.

1 Like

To temporarily patch it up, you can issue systemdctl --edit php8.1-fpm and insert:

[Service]
Restart=on-failure
RestartSec=300
StartLimitBurst=3
StartLimitInterval=2h

To auto-restart the service.

1 Like

Xeruf, Thank you for the answer, I will implement it immediately.

It also happens with clamav-daemon not just PHP. And the log still does not record the service outages.

How much of system memory do you have?

4 GB

According older bench marks

If I would need to guess: probaly ram full and no swap file.

1 Like

This is why I asked, since I couldn’t run server with clamav on 4GB, it swapped all the time.

the point is on “no swap file”, this would lead to crashes - with swap you’re right, would make it slow.