-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Fix CarrierWave reads large files into memory #2314
Merged
mshibuya
merged 4 commits into
carrierwaveuploader:master
from
dosuken123:fix-large-file-memeory-consumption
May 28, 2018
Merged
Fix CarrierWave reads large files into memory #2314
mshibuya
merged 4 commits into
carrierwaveuploader:master
from
dosuken123:fix-large-file-memeory-consumption
May 28, 2018
Conversation
This file contains 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
@mshibuya Hi. I assume you're the one of the mainteners. Could you review this PR, please? Thanks! |
/cc @amatsuda |
dosuken123
force-pushed
the
fix-large-file-memeory-consumption
branch
from
May 28, 2018 05:36
7348ccc
to
800e0db
Compare
Great, thanks. |
@mshibuya Would you mind pushing new CarrierWave release with that? |
@mshibuya do you have moment to do it? :) |
@mshibuya :) |
Sure, but give me some time for it 🙏 |
filipalacerda
pushed a commit
to gitlabhq/gitlabhq
that referenced
this pull request
Jun 1, 2018
filipalacerda
pushed a commit
to gitlabhq/gitlabhq
that referenced
this pull request
Jun 1, 2018
…ve' into 'master' Add a monkey patch of carrierwaveuploader/carrierwave#2314 See merge request gitlab-org/gitlab-ce!19102
This was referenced Jun 30, 2018
@ayufan Sorry for delay, just released 1.2.3 🚢 |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
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.
Hi from GitLab.
We're currently having a problem because Carrierwave eagerly loads large files into memory. This was originally fixed at #468, but reproduced at #1517.
I fixed by adding a logic to reopen closed streams when
::Fog#read
is kicked. This shouldn't affect Carrierwave performance, nor breaking #1517 changes.Just in case, I added a test to check that CW works even if the file is
StringIO
, i.e.new_file.read
path./cc