-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 nginx buffering for file downloads #29400
Conversation
@PVince81 @jvillafanez |
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.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Squash please - otherwise 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
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. |
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.