Why isn't uWSGI respecting the "--http-keepalive" flag?
I was finally able to get keepalive working by switching from --http-socket
to simply --http
. According to uWSGI docs:
If your web server does not support the uwsgi protocol but is able to speak to upstream HTTP proxies, or if you are using a service like Webfaction or Heroku to host your application, you can use
http-socket
. If you plan to expose your app to the world with uWSGI only, use thehttp
option instead, as the router/proxy/load-balancer will then be your shield.
In my particular case, it was also necessary to load the http
plugin.