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.
TL;DR: This PR disables proxy_buffering in Nextcloud's example Docker setups to fix large file (>1GB) download failures over slower network connections, reverting a recent breaking change within nginx-proxy.
Summary
This Pull Request reintroduces a configuration that has been crucial for the stability and functionality of Nextcloud's example Docker setups. It disables
proxy_buffering
within these configurations, reverting a change made in the December 2023 release (v1.5.0) of nginx-proxy whereproxy_buffering
was enabled after being disabled for over nine years.Background
The enablement of
proxy_buffering
in the recent nginx-proxy release has introduced a significant breaking change affecting file download operations, particularly observed with large files. Files larger than 1 GB are prone to cutoff issues, stemming from the limitations imposed by the defaultproxy_max_temp_file_size
. This has disrupted the expected and long-standing behavior of file downloads through Nextcloud's Docker setups, effectively hindering the reliability of serving large files.Technical Implications
The re-enablement of
proxy_buffering
causes nginx to use temporary files for buffering responses from proxied servers. For large downloads, this behavior leads to an accelerated filling of the proxy's temporary storage, resulting in downloads being prematurely terminated once theproxy_max_temp_file_size
threshold is reached. Given that increasing the download speeds or the temporary file size is not feasible—due to external network conditions and storage constraints, respectively—the restoration of the pre-v1.5.0 behavior becomes essential.Proposed Solution
After thorough considerations of the available options and taking into account the successful operation of the previous configuration since 2014, this Pull Request proposes to disable
proxy_buffering
for Nextcloud's example Docker setups. This change aims to:Conclusion
Reverting the
proxy_buffering
setting is a targeted measure to maintain the robustness and user satisfaction of Nextcloud's Docker-based deployments, particularly concerning large file handling. I believe this change will restore the expected download functionality and efficiency that we have relied on over the years.