This is related to other post i made about this issue.
I discover that opcache is the responsable for those errors. When its disabled all is working fine. But when its enabled the fpm pools start giving 502 errors. And the PHP logs is full of this:
[08-Aug-2022 13:26:09] WARNING: [pool mavequipamiento.com.ar] child 894470 exited with code 70 after 9784.181492 seconds from start
Do you know if there is something i can do to fix opcache. I really wish to have it activated, because it helps a lot with sites speed.
The server is a big one. With almost 600 sites. But it has a lot of RAM (256 GB), so i think thats not a problem.
I dont know what else to change in order to make this work. I played a lot with opcachen settings but its always the same.
Thanks eris, you say its convenient to set max request to a low number?
Maybe some of the sites has errors that are causing the processes not to finish properly and after the pool is saturated its start to give 502 errors.
Thanks anyways. That link its a clue. Will do some test. I think i already identify the problematic website. What surprise me is that one site makes all the php master processes across versions to fail.
That’s a lot of sites that I’m guessing you’re not the necessary administrator of each one so you probably don’t have quality control. I would probably set your maximum request for PHP much lower let it recycle the workers more. There’s also an option under /etc/phpxx/ phpfpm.ini cause PHP to restart if the workers get stuck.
Do you happen to be using (I forget the exact setting) but it’s commented in the php.ini to set of root for opcache scripts? You could be having sites somebody edited a core file and when it runs that version saved for other site cause a crash. So it might be better to set it so basically every site is caching scripts separate.
Also could be people making changes and opcache not updating timely. Do you have a revalidation period set? It kind of removes some of the benefits but you can set it much higher than the default like 5 10 15 minutes.