I recently inherited administration over 2 Nginx boxes in AWS and am very unfamiliar with how PHP-FPM works (and doens't work). I recently integrated Keen.IO for backend user logging, using:
fastcgi_finish_request();
in php to finish the request and then continue on to log to Keen. This seemed to be working good except for some higher latency which I assume the user was not experiencing because they had already disconnected.
Today however, as traffic built, we started getting 502 gateway errors, and both servers have the following error:
[error] 2356#0: *70245 upstream sent unexpected FastCGI record: 3 while reading response header from upstream, client: (ADDRESS), server: igun-api-slaves.crimson-moon.com, request: "GET (Address)", upstream: "fastcgi://unix:/var/run/php-fpm/product1.socket:", host: "ADDRESS"
This happens on all of our pages, not just the ones I modified with logging. I am completely lost as this is all new for me. What exactly does this error mean?
-- EDIT
I see now in AWS cloud watch that the errors have been coming ever since the code was edited, not just when the traffic built.