Hi everybody,
I found that downloading large private files (> 40Mb at php.ini memory_limit = 128 MB) is impossible with UC.
Step by step:
- Install fresh Drupal 7 and configure default file download method as 'Private local files served by Drupal'. Private file system path: sites/default/files/private.
- Tune your front web-server properly. For nginx it's:
location ^~ /sites/default/files/private/ { internal; } - Configure some module that manages private files access rights. I use this one: https://www.drupal.org/project/private_files_download_permission. Configure it so that the root private files path (sites/default/files/private/) be accessible for e.g. admin.
- Download and enable UC:
drush dl ultimate_cron && drush en -y ultimate_cron - Go to your private directory and create two dummy files:
cd <Drupal_Root>/sites/default/files/private/; dd if=/dev/zero of=test40.dat bs=1M count=40; dd if=/dev/zero of=test400.dat bs=1M count=400 - Try to download both (as an admin):
http://your-site/system/files/test40.dat
http://your-site/system/files/test400.dat
I cannot download the large file and PHP generates an error:
FastCGI sent in stderr: "PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 129761280 bytes) in /var/www/drupal/includes/file.inc on line 1968
Disabling Ultimate Cron helps to solve the problem.
It's quite major problem for me, could you please investigate it?
Thank you,
Alexander
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | private_file_system_is-2559429-4.patch | 543 bytes | vurt |
Comments
Comment #2
Chewits commentedComment #3
klapper commentedI guess, the reason is the following code in ultimate_cron.poorman.inc:
The function ultimate_cron_poorman_capable should return FALSE for the path "system/files".
Comment #4
vurt commentedHere is a patch implementing the finding of klapper. It is against version 7.x-2.x-dev from 2015-Sep-19.
Comment #6
arnested commentedThank you for your contribution, everyone. I have added the patch to the 7.x-2.x branch.