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

turn off proxy request buffering to allow for better upload streaming and fix super large uploads #1681

Merged
merged 1 commit into from
Dec 22, 2021

Conversation

mwrock
Copy link
Contributor

@mwrock mwrock commented Dec 14, 2021

fixes #1663

I noticed that the upload stream was hanging after a couple GB. Eventually the connection on the client or the nginx gateway would timeout which would close the stream leaving an incomplete temp file and ultimately resulting in a premature eof error while extracting the archive. I also observed that builder-api did not begin to read the stream until the client had sent the entire file. That seemed odd since the http 1.1 chunked encoding should allow for proper streaming.

I eventually tried bypassing nginx and sending the upload strictly to builder-api. This resulted in a successful upload as well as proper streaming behavior.

I later discovered the proxy_request_buffering setting in nginx. By default this is on and causes nginx to buffer the entire body before sending it off to builder-api. By turning it off, I got proper streaming and successful uploads. I'm still not clear why the stream was hanging, but this appears to fix the problem.

Signed-off-by: Matt Wrock matt@mattwrock.com

… and fix super large uploads

Signed-off-by: Matt Wrock <matt@mattwrock.com>
Copy link
Contributor

@sajjaphani sajjaphani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@mwrock mwrock merged commit 8547d88 into main Dec 22, 2021
@mwrock mwrock deleted the buffering branch December 22, 2021 14:45
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.

422 (processable entity) failures returned when uploading large (8gb) hart files
2 participants