Disable nginx buffering for file downloads#29400
Merged
Merged
Conversation
Contributor
|
@PVince81 @jvillafanez |
9 tasks
Member
Author
|
Backport to stable10 in #29403 |
Codecov Report
@@ Coverage Diff @@
## master #29400 +/- ##
============================================
+ Coverage 60.51% 60.51% +<.01%
Complexity 17193 17193
============================================
Files 1031 1031
Lines 57288 57289 +1
============================================
+ Hits 34667 34668 +1
Misses 22621 22621
Continue to review full report at Codecov.
|
DeepDiver1975
requested changes
Nov 2, 2017
DeepDiver1975
left a comment
Member
There was a problem hiding this comment.
Squash please - otherwise 👍
87 tasks
|
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
nginx buffering seems to be causing memory problems while a big file download is happening (big file upload hasn't been checked). The memory usage of the nginx process (not the php-fpm) keeps growing which might crash the server at some point depending on the file size and the memory available in the server.
Note that this behaviour isn't present in apache or in nginx without buffering the response
Related Issue
#29328
Motivation and Context
This solution should disable the nginx buffering only for file downloads. The rest of the operation should behave normally depending on the specific nginx configuration.
While modifying the nginx configuration should be possible, it might be complex to disable just the buffering for file downloads, so you might disable the it for the whole server or for a specific location context.
How Has This Been Tested?
Tested manually with a 4.4GB file (check #29328 (comment) for set up)
Screenshots (if appropriate):
Types of changes
Checklist:
@DeepDiver1975 @PVince81 To be decided if this will be the solution. Not happy to include server-specific code but it's probably the easiest solution.