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

Disable proxy request buffering #282

Closed
Greek64 opened this issue Jan 14, 2023 · 3 comments
Closed

Disable proxy request buffering #282

Greek64 opened this issue Jan 14, 2023 · 3 comments
Labels
Milestone

Comments

@Greek64
Copy link

Greek64 commented Jan 14, 2023

I was having trouble pushing large image layers (over 20GB in size) to the docker registry via the docker-registry-ui. It would always fail (logs were showing received unexpected HTTP status: 500 Internal Server Error) and restart the layer transfers from scratch, whereas a direct connection and push to the docker registry works as expected.

After extensive search it turns out it is the proxy buffering that nginx does per default.
It actually makes the tranfer take more time, because it is initially buffered completely locally in the nginx instance, before being sent to the docker registry, meaning twice the delay.
As a matter of fact I always had problems with buffering and would disable it on all nginx instances, but I missed the fact that docker-registry-ui internally also uses one (duh!).

Setting proxy_request_buffering off; in the nginx config solves the problem.
I would suggest adding this in the default nginx configuration, and maybe also proxy_read_timeout with a higher than default setting (I use 3600s) to mitigate timeout problems when the docker pull command takes a long time due to slow transfer speed.

@Joxit
Copy link
Owner

Joxit commented Jan 18, 2023

Hi there, thank you for using my project and posting issues 😄

First I want to say, be careful with proxy_request_buffering off;, this is one of the ten mistakes people do in NGINX configurations. This must be use in some specific circumstances.

It seems that this is a right circumstance, so I will add this configuration 😄

@Joxit Joxit added the bug label Jan 18, 2023
@Joxit Joxit added this to the 2.4.0 milestone Jan 18, 2023
@Greek64
Copy link
Author

Greek64 commented Jan 20, 2023

Hi there, thank you for providing and maintaining this project.
Do note that the link you mentioned talks about proxy_buffering, which is not the same as proxy_request_buffering.
I'll also change the title of the issue to reflect that.

@Greek64 Greek64 changed the title Disable proxy buffering Disable proxy request buffering Jan 20, 2023
@Joxit Joxit closed this as completed in 0a6d08b Jan 23, 2023
@Joxit
Copy link
Owner

Joxit commented Jan 23, 2023

Yes you're right ! And proxy_buffering is already set to off in the nginx configuration !

Anyway, I pushed the new configuration, it will be available in the main/master tag now and in the next release 2.4.0 but I still have some work to do for a release 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants