Increase client_body_buffer_size to be larger than UPLOAD_CHUNK_SIZE #5196
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 wasproxy_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