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

uploader.cache! loads entire contents of file into memory #2136

Closed
vergenzt opened this issue Mar 10, 2017 · 5 comments
Closed

uploader.cache! loads entire contents of file into memory #2136

vergenzt opened this issue Mar 10, 2017 · 5 comments

Comments

@vergenzt
Copy link

I've been encountering this in production with 1-2 GB uploads and it's causing background processors to crash. :( (They cache! the file first from AWS in order to do local processing.)

The load happens at this line:

def sanitized_file
  _content = file.read

  # ...

end

I've been trying to look around and see if I can figure out how to fix it, but I've gotten a bit lost in the codebase and am not sure where this needs to be fixed.

Why does the whole file get read into the sanitized file? What's the purpose of the sanitized file here in the first place?

@thauburger
Copy link

+1

3 similar comments
@oponce1611
Copy link

+1

@a-barbieri
Copy link

+1

@thucnguyen
Copy link

+1

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

No branches or pull requests

6 participants