python – Nginx/Guicorn 502s under load
I have an application serving WebSockets that proxies to Gunicorn using Nginx. I am seeing when a bunch of clients (say 30) are already busy interacting with the server, new attempts to connect to the proxy are failing with 502 errors.
I understand this could just be load, but what is strange is these 502s happen always after 10 seconds (Nginx logs). I’ve upped every timeout both in Nginx and Guicorn but always its ~ 10 seconds.
Need some guidance as to what controls that timeout and what I might change to get the 502s to go away.
Also, worth noting, if the 30 clients just connect and don’t start interacting with the websocket, I can connect 100 more clients just fine.
Read more here: Source link
