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

Problem: Large downloads from FS fail since file ends up being loaded into memory despite iteration #1717

Open
5 tasks
carlosmcgregor opened this issue Nov 19, 2024 · 0 comments

Comments

@carlosmcgregor
Copy link

Expected behaviour

Large download from FS is streamed (or equivalent) successfully.

Current behaviour

Large download from FS ends up loading the large file into memory, causing it to throw a 502 status code.

Steps to reproduce

  1. Prepare a large archival package
  2. Attempt to download it from FS

Solution

A temporary fix to this issue that currently fits our need is to change the HttpResponse to a StreamingHttpResponse here:
https://github.com/artefactual/archivematica/blob/qa/1.x/src/dashboard/src/components/helpers.py#L269

To my understanding (and unfortunately) this would cause a Django worker to be blocked while streaming.

Your environment (version of Archivematica, operating system, other relevant details)

  • Archivematica: 1.14.0 - 1.16.0
  • OS: Ubuntu 22.04

For Artefactual use:

Before you close this issue, you must check off the following:

  • All pull requests related to this issue are properly linked
  • All pull requests related to this issue have been merged
  • A testing plan for this issue has been implemented and passed (testing plan information should be included in the issue body or comments)
  • Documentation regarding this issue has been written and merged (if applicable)
  • Details about this issue have been added to the release notes (if applicable)
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

1 participant