zulip/docs
Alex Vandiver 4fd51cb5ad uwsgi: Increase request buffer size to 64k, from 8k default.
The default value in uwsgi is 4k; receiving more than this amount from
nginx leads to a 502 response (though, happily, the backend uwsgi does not
terminate).

ab18dbfde5 originally increased it from the unstated uwsgi default
of 4096, to 8192; b1da797955 made it configurable, in order to allow
requests from clients with many cookies, without causing 502's[1].

nginx defaults to a limitation of 1k, with 4 additional 8k header
lines allowed[2]; any request larger than that returns a response of
`400 Request Header Or Cookie Too Large`.  The largest header size
theoretically possible from nginx, by default, is thus 33k, though
that would require packing four separate headers to exactly 8k each.

Remove the gap between nginx's limit and uwsgi's, which could trigger
502s, by removing the uwsgi configurability, and setting a 64k size in
uwsgi (the max allowable), which is larger than nginx's default limit.

uWSGI's documentation of `buffer-size` ([3], [4]) also notes that "It
is a security measure too, so adapt to your app needs instead of
maxing it out."  Python has no security issues with buffers of 64k,
and there is no appreciable memory footprint difference to having a
larger buffer available in uwsgi.

[1]: https://chat.zulip.org/#narrow/stream/31-production-help/topic/works.20in.20Edge.20not.20Chrome/near/719523
[2]: https://nginx.org/en/docs/http/ngx_http_core_module.html#client_header_buffer_size
[3]: https://uwsgi-docs.readthedocs.io/en/latest/ThingsToKnow.html
[4]: https://uwsgi-docs.readthedocs.io/en/latest/Options.html#buffer-size
2022-06-28 16:14:24 -07:00
..
_static readthedocs: Add proper backlink to the Zulip homepage. 2021-07-06 10:59:59 -07:00
_templates docs: Follow Sphinx 4 rename of master_doc to root_doc. 2021-08-31 14:24:16 -07:00
contributing Remove Debian 10 support. 2022-04-26 16:32:02 -07:00
development docs: Fix typo in gitlab callback url in dev setup instructions. 2022-06-02 12:04:18 -07:00
documentation integrations-docs: Remove zulip-config.md. 2022-06-27 17:23:26 -07:00
git docs: Update WIP PR convention to GitHub draft PRs. 2022-06-28 13:16:38 -07:00
images docs: Add missing width to Zulip logo. 2021-02-05 09:49:33 -08:00
overview docs: Capitalize Handlebars consistently. 2022-06-27 13:35:10 -07:00
production uwsgi: Increase request buffer size to 64k, from 8k default. 2022-06-28 16:14:24 -07:00
subsystems docs: Document Transifex steps for new major releases. 2022-05-27 15:22:17 -07:00
testing docs: Capitalize Handlebars consistently. 2022-06-27 13:35:10 -07:00
translating docs: Capitalize Handlebars consistently. 2022-06-27 13:35:10 -07:00
tutorials actions: Delete zerver.lib.actions. 2022-04-14 17:14:38 -07:00
.gitignore gitignore: Anchor patterns that should be anchored. 2017-07-19 14:03:49 -07:00
code-of-conduct.md repository: Add CODE_OF_CONDUCT.md. 2017-06-14 18:43:08 -07:00
conf.py docs: Convert .html#fragment links to .md#fragment. 2022-02-28 16:28:31 -08:00
index.md documentation: Update tutorial for writing help center documentation. 2022-01-25 18:42:04 -08:00
Makefile Revert "docs: Temporarily disable parallel building." 2022-02-28 16:28:31 -08:00
README.md docs: Capitalize Markdown consistently. 2020-08-11 10:23:06 -07:00
requirements.readthedocs.txt requirements: Rename requirements files. 2017-11-21 02:38:26 +05:30
THIRDPARTY check-thirdparty: License under GPLv2+. 2022-06-26 17:33:11 -07:00

Zulip Markdown documentation hosted elsewhere

The Markdown files in this directory ( /zulip/docs ) are not intended to be read on GitHub. Instead, visit our ReadTheDocs to read the Zulip documentation.