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

Increase client_body_buffer_size to be larger than UPLOAD_CHUNK_SIZE #5196

Merged
merged 1 commit into from Jun 8, 2023

Conversation

kraih
Copy link
Member

@kraih kraih commented Jun 8, 2023

The vast majority of requests handled by the webui are artefact uploads. These tend to be around 1mb in size because of the default UPLOAD_CHUNK_SIZE value. Buffering them all to disk is unnecessary and causes quite a bit of disk I/O overhead.

I've tested two solutions for this. The first was
client_body_buffer_size 2m, which had the desired effect and only left a very small number of uploads to be buffered to disk. The second was proxy_request_buffering off (disabling all upload buffering), which seemed to work as well at first, but then caused the webui app server to be overwhelmed at peak times (502 Bad Gateway responses).

Nginx appears to be doing a pretty good job protecting the webui from traffic spikes with buffering. We should probably leave it enabled for larger HTTP bodies.

Progress: https://progress.opensuse.org/issues/129490

The vast majority of requests handled by the webui are artefact uploads.
These tend to be around 1mb in size because of the default
UPLOAD_CHUNK_SIZE value. Buffering them all to disk is unnecessary and
causes quite a bit of disk I/O overhead.

I've tested two solutions for this. The first was
`client_body_buffer_size 2m`, which had the desired effect and only left
a very small number of uploads to be buffered to disk. The second was
`proxy_request_buffering off` (disabling all upload buffering), which
seemed to work as well at first, but then caused the webui app server to
be overwhelmed at peak times (502 Bad Gateway responses).

Nginx appears to be doing a pretty good job protecting the webui from
traffic spikes with buffering. We should probably leave it enabled for
larger HTTP bodies.

Progress: https://progress.opensuse.org/issues/129490
@mergify mergify bot merged commit 4939438 into master Jun 8, 2023
41 checks passed
@mergify mergify bot deleted the k/nginx_buffers branch June 8, 2023 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants