New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http-keepalive must be set as int from ini #2018
Comments
If anyone knows if this is expected behavior or not, I would be happy to make the relevant changes. If it is expected, I can update the documentation to make it more clear for the next person who wants to enable keep-alives from a wsgi.ini. If it is unexpected, I can dust off my C skills and work on changing the config setting to a bool. Thanks! |
Code suggests it should be a positive integer, so an hint about the type (seconds) would be nice to be added in help text in |
Thanks for the info! I'll get a PR together soon w/ added documentation here, and an .ini example in the uwsgi-docs repo. From what I recall during my initial debugging, the value of http-keepalive is used as a bool, and not for any other configuration, like timeout in seconds, or seconds to keep an unused connection pooled. Most documentation shows the keepalives being set with a simple bool flag I'll take another look, and add any relevant documentation to the PR. |
Also related to: #1637 |
Closing this issue since #2032 got merged |
I'm not sure if this is a bug or if the documentation just needs to be a little more clear here.
While it is noted in the uWSGI config options that the parser for http-keepalive is uwsgi_opt_true, it isn't immediately obvious or clear. Making it worse, there are many examples floating around out there of people suggesting adding
http-keepalve=true
to their uwsgi.ini config files when the correct usage fromIf this isn't a bug where
http-keepalive=true
should correctly enable keep-alives, I propose updating the Native HTTP documentation w/ an example.Existing documentation: https://github.com/unbit/uwsgi-docs/blob/master/HTTP.rst
Here is the my .ini config for reference. After a lot of trouble shooting and digging through the uWSGI source, the only change I needed to make for keep-alives to be respected was to change
http-keepalive=true
tohttp-keepalive=1
.The text was updated successfully, but these errors were encountered: