Skip to content
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

[FW][ADD] server: allow env variable to control HTTP socket timeout #51968

Closed

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented May 27, 2020

⚠️ As indicated in the comments, it's much preferred to perform response buffering at the reverse proxy level than to increase the socket timeout. It will free up HTTP workers for other requests faster, while the proxy does the work of buffering the stream on disk as needed.

The timeout is also used to protect from accidental DoS effects in situations of low worker availability, due to idle connections caused e.g. by wkhtmltopdf's connection pooling. Setting a high timeout will make the protection less effective, so ensuring you have enough free HTTP workers at all times becomes critical.

In our tests with nginx's defaut buffering on a typical hardware with SSD storage, buffering up to 1GB responses did not require any change of the socket timeout on the Odoo side, though your mileage may vary.

See also nginx's proxy_buffering and proxy_max_temp_file_size config directives.

OPW-2247730
See also: #20158

Forward-Port-Of: #51824

As indicated in the comment, it's much preferred to perform response
buffering at the reverse proxy level than to increase the socket
timeout. It will free up HTTP workers for other requests faster, while
the proxy does the work of buffering the stream on disk as needed.

/!\ The timeout is also used to protect from accidental DoS effects
in situations of low worker availability, due to idle connections
caused e.g. by wkhtmltopdf's connection pooling.
Setting a high timeout will make the protection less effective, so
ensuring you have enough free HTTP workers at all times becomes critical.

In our tests with nginx's defaut buffering on a typical hardware with
SSD storage, buffering up to 1GB responses did not require any change
of the socket timeout on the Odoo side, though your mileage may vary.
See also nginx's `proxy_buffering` and `proxy_max_temp_file_size` config
directives.

OPW-2247730
See also: odoo#20158

X-original-commit: d78ea12
@robodoo robodoo added forwardport This PR was created by @fw-bot seen 🙂 labels May 27, 2020
@fw-bot
Copy link
Contributor Author

fw-bot commented May 27, 2020

This PR targets 12.0 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the CI 🤖 Robodoo has seen passing statuses label May 27, 2020
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 27, 2020
robodoo pushed a commit that referenced this pull request May 27, 2020
As indicated in the comment, it's much preferred to perform response
buffering at the reverse proxy level than to increase the socket
timeout. It will free up HTTP workers for other requests faster, while
the proxy does the work of buffering the stream on disk as needed.

/!\ The timeout is also used to protect from accidental DoS effects
in situations of low worker availability, due to idle connections
caused e.g. by wkhtmltopdf's connection pooling.
Setting a high timeout will make the protection less effective, so
ensuring you have enough free HTTP workers at all times becomes critical.

In our tests with nginx's defaut buffering on a typical hardware with
SSD storage, buffering up to 1GB responses did not require any change
of the socket timeout on the Odoo side, though your mileage may vary.
See also nginx's `proxy_buffering` and `proxy_max_temp_file_size` config
directives.

OPW-2247730
See also: #20158

closes #51968

X-original-commit: d78ea12
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
@robodoo robodoo closed this May 27, 2020
@robodoo robodoo temporarily deployed to merge May 27, 2020 15:12 Inactive
@fw-bot fw-bot deleted the 12.0-11.0-http-sock-timeout-xDol-fw branch June 10, 2020 15:46
AdriaGForgeFlow pushed a commit to ForgeFlow/odoo that referenced this pull request Jan 28, 2021
As indicated in the comment, it's much preferred to perform response
buffering at the reverse proxy level than to increase the socket
timeout. It will free up HTTP workers for other requests faster, while
the proxy does the work of buffering the stream on disk as needed.

/!\ The timeout is also used to protect from accidental DoS effects
in situations of low worker availability, due to idle connections
caused e.g. by wkhtmltopdf's connection pooling.
Setting a high timeout will make the protection less effective, so
ensuring you have enough free HTTP workers at all times becomes critical.

In our tests with nginx's defaut buffering on a typical hardware with
SSD storage, buffering up to 1GB responses did not require any change
of the socket timeout on the Odoo side, though your mileage may vary.
See also nginx's `proxy_buffering` and `proxy_max_temp_file_size` config
directives.

OPW-2247730
See also: odoo#20158

closes odoo#51968

X-original-commit: d78ea12
Signed-off-by: Olivier Dony (odo) <odo@openerp.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI 🤖 Robodoo has seen passing statuses forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants