I have a setup of nginx1.20.1 + php7.3.3 on Centos7. We run those VMs beneath google cloud load balancer. Sometimes, randomly there is 502 returned to the end client. I traced one of those error sources to the Nginx error log saying "upstream prematurely closed FastCGI stdout while reading response header from upstream".
What would be the easiest way to debug what is causing these random events?
Recently I modified www.conf file and increased pm.max_children values to higher as I had warning of them being reached to the maximum. I hoped that it would be the cause of those errors, but it did not solve the problem.
I should somehow trace that event on production, but how?
0 Answers