PHP-FPM crash giving 502 gateway error after a few hours

I am experiencing a very annoying problem with PHP-FPM and i dont know what else to check in order to fix it. Maybe one of you can give me a hint.

My server is running Hestia with Nginx + PHP-FPM. Its a big server, with 500 users and 256 GB of RAM.

A few weeks ago PHP-FPM started to crash after a few hours of working correctly. And only restarting the service fix the issue.

In the exact moment of the crash, all pools are unresponsive. And the error log is full of messages like this:

[08-Aug-2022 13:26:06] WARNING: [pool recreoshop.com.ar] child 1054235 exited with code 70 after 23.371330 seconds from start
[08-Aug-2022 13:26:06] NOTICE: [pool recreoshop.com.ar] child 1054557 started
[08-Aug-2022 13:26:06] WARNING: [pool recreoshop.com.ar] child 1054527 exited with code 70 after 2.152901 seconds from start
[08-Aug-2022 13:26:06] NOTICE: [pool recreoshop.com.ar] child 1054558 started
[08-Aug-2022 13:26:06] WARNING: [pool lacasadelmusico.com.ar] child 1053709 exited with code 70 after 60.499350 seconds from start
[08-Aug-2022 13:26:06] NOTICE: [pool lacasadelmusico.com.ar] child 1054562 started
[08-Aug-2022 13:26:06] WARNING: [pool lacasadelmusico.com.ar] child 1053710 exited with code 70 after 60.509688 seconds from start
[08-Aug-2022 13:26:06] NOTICE: [pool lacasadelmusico.com.ar] child 1054563 started
[08-Aug-2022 13:26:07] WARNING: [pool doroitalianbar.com] child 1051332 exited with code 70 after 152.271806 seconds from start
[08-Aug-2022 13:26:07] NOTICE: [pool doroitalianbar.com] child 1054566 started
[08-Aug-2022 13:26:07] WARNING: [pool doroitalianbar.com] child 1054387 exited with code 70 after 12.700660 seconds from start
[08-Aug-2022 13:26:07] NOTICE: [pool doroitalianbar.com] child 1054567 started
[08-Aug-2022 13:26:07] WARNING: [pool doroitalianbar.com] child 1054388 exited with code 70 after 13.063872 seconds from start
[08-Aug-2022 13:26:07] NOTICE: [pool doroitalianbar.com] child 1054569 started
[08-Aug-2022 13:26:07] WARNING: [pool miguelabad.com.ar] child 1052039 exited with code 70 after 104.733904 seconds from start
[08-Aug-2022 13:26:07] NOTICE: [pool miguelabad.com.ar] child 1054570 started
[08-Aug-2022 13:26:07] WARNING: [pool miguelabad.com.ar] child 1054544 exited with code 70 after 2.465329 seconds from start
[08-Aug-2022 13:26:07] NOTICE: [pool miguelabad.com.ar] child 1054571 started
[08-Aug-2022 13:26:08] WARNING: [pool panorama24.com.ar] child 1054432 exited with code 70 after 9.139629 seconds from start
[08-Aug-2022 13:26:08] NOTICE: [pool panorama24.com.ar] child 1054580 started
[08-Aug-2022 13:26:08] WARNING: [pool panorama24.com.ar] child 1054440 exited with code 70 after 8.476681 seconds from start
[08-Aug-2022 13:26:08] NOTICE: [pool panorama24.com.ar] child 1054581 started
[08-Aug-2022 13:26:08] WARNING: [pool mavequipamiento.com.ar] child 894469 exited with code 70 after 9783.797327 seconds from start
[08-Aug-2022 13:26:08] NOTICE: [pool mavequipamiento.com.ar] child 1054584 started
[08-Aug-2022 13:26:08] WARNING: [pool mavequipamiento.com.ar] child 894468 exited with code 70 after 9783.803587 seconds from start
[08-Aug-2022 13:26:08] NOTICE: [pool mavequipamiento.com.ar] child 1054585 started
[08-Aug-2022 13:26:09] WARNING: [pool mavequipamiento.com.ar] child 894470 exited with code 70 after 9784.181492 seconds from start
[08-Aug-2022 13:26:09] NOTICE: [pool mavequipamiento.com.ar] child 1054588 started
[08-Aug-2022 13:26:09] WARNING: [pool berollhcm.com] child 1054287 exited with code 70 after 24.113110 seconds from start
[08-Aug-2022 13:26:09] NOTICE: [pool berollhcm.com] child 1054591 started
[08-Aug-2022 13:26:09] WARNING: [pool berollhcm.com] child 1054548 exited with code 70 after 4.312960 seconds from start
[08-Aug-2022 13:26:09] NOTICE: [pool berollhcm.com] child 1054592 started

In this case is PHP 7.4.

I read that code 70 is a general error and might be RAM memory issue. The thing is that i checked the memory consumption in the middle of the crash and the server has at least 100 GB of available memory, and swap is untouched. So it doesnt make sense to say that the server is run out of memory.

Opcache is enabled, and the size of cache is 6 GB for version 7.4, its always full, but can this cause all the php processes to fail?

Its important to clarify that i am running the pools in “dynamic” mode, i change the default on demand to dynamic in the hestia php pool template.

Please if any of you can help me solve this issue i will be very happy.

Thanks to this amazing community!

1 Like