uwsgi + nginx + POST request = 502 Bad Gateway
I was having big problem with 502 bad gateway when using uwsgi and nginx.
Always on POST requests and mostly with big files.
After much research seems that the buffer-size parameter in uwsgi was the underlying cause.
I tried to play around with different values, some worked better than others but none config was able to get rid completely of the problem. The best values was 4k or comenting out the buffer-size at all.
Some post called this "the request of death"! And said they got rid of with with a 8k buffer size.
But none of this worked for me. None!
I decided to switch back to Apache wsgi that have been working for us so restlessly for so many years without problems.
I still don't know what was wrong with uwsgi but apache did de job right and that's what we want.
No more headaches, no more users getting Bad Gateway!