Active
Project:
Drupal core
Version:
main
Component:
file system
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
19 Nov 2026 at 14:35 UTC
Updated:
24 Nov 2026 at 21:06 UTC
Jump to comment: Most recent
We are encountering a problem downloading large private files from a Drupal site.
The file downloads but the content of the file is:
Fatal error: Allowed memory size of 536870912 bytes exhausted (tried to allocate 400592896 bytes) in /var/www/vendor/symfony/http-foundation/BinaryFileResponse.php on line 347
This started happening after we upgraded from 11.3 to 11.4
* Create a large private file (ours was around 450Mb).
* Attempt to download the file using the system/files path.
* Check the contents of the downloaded file, it should contain the oom error.
Comments
Comment #2
lambic commentedAs a test I downgraded Drupal to 11.3.22 and the error went away, but then I made the file a bit bigger and the error came back.
Comment #3
cilefen commentedWhat is the setup of the site?
Comment #4
lambic commentedInstalled with composer in a docker container.
Private files directory is a volume.
Private files are attached to paragraphs which are in turn attached to a group entity (from the groups module).
File access is controlled by group permissions.
Private file paths are the standard system/files/... paths.
The files themselves are large csv files.
memory_limit is set to 512mb
What else would you need to know?
Comment #5
lambic commentedAlso I've narrowed the file size down, the error starts occuring for files larger than 400mb
Comment #6
longwavePrior to the update were files of over 512Mb possible? I haven't traced the code but I assume serving private files involves loading them into available memory, and some memory is needed by Drupal to do this; it is possible that in 11.3 to 11.4 memory usage has increased slightly so it may be that files that were close to the limit before are now over it?