I am uWSGI as an application server under AWS ALB and had 502 errors under load. I changed my configuration from
http-socket = 0.0.0.0:1701
to
http = 0.0.0.0:5000
http-keepalive = 1
and it seems to resolve the issue. I am not getting any 502s under the same load. I understand that uWSGI must be sending the Connection: keep-alive
header in the response. However, I don’t see any such headers in the response. I also tried directing hitting 0.0.0.0:5000
from the host that runs uWSGI, but I don’t see any changes in the response. Can someone please explain how the http-keepalive
option works in the uWSGI? TIA