Environment is Nginx + uwsgi.
Getting a 502 bad gateway error from Nginx on certain GET requests. Seems to be related to the length of the URL. In our particular cas
It doesn't come up occasionally.
I guess the most possible reason of that is the size of your php-fpm.log is oversize. Try to change your log_level to upper level in php-fpm.conf and clear the logs.
php-fpm.log
log_level
php-fpm.conf
Anyway, it works for me.