1. NOTICE: If you are using Fabrik and update to Joomla 3.10, you will need to update to Fabrik 3.10. And, if you are using Fabrik, do not upgrade to Joomla 4, we do not have a supported version ready for release. More information on a release date coming soon. Also, please note that Fabrik 3.10 will not install on any Joomla sites less than 3.8.
    Dismiss Notice

Unable to download big files

Discussion in 'Community' started by vladimir84, Mar 21, 2018.

  1. vladimir84

    vladimir84 Member

    Level: Community
    HTTP ERROR 500 when I try to download a ZIP file by a download script, and that was uploaded by a non-ajax uploader.
    The file size is over 300MB which I think is the problem, given that smaller ZIPs work fine.

    Without the download script, it works fine, however I cannot have the icon as a placeholder for downloads (or can I?) and it shows the file name.

    I increased the max file size of PHP to well over 500MB and increased memory to 256MB.

    I tried looking through fileupload.php and js for some inspiration, but I'm clueless where the problem is.

    PS I disabled the security check because it kept rejecting the file (the zip contains many extensions)
  2. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Try increasing memory to 500+.

    The problem is that we read the whole file into memory before we serve it, so you need file size + J!/Fabrik size.

    One of these days I'll look at chunking the download, so we just read / output a certain buffer size at a time.

    -- hugh
  3. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    Meh, I decided to go ahead and do this, as I have a client who will probably need it anyway.


    So if you feel brave, do a full github update (see wiki). Use Akeeba and make a full site backup first.

    The new code streams the file in 1mb chunks, rather than reading the whole thing into memory.

    I've tested it with a 100mb file, both with local storage and S3 storage (in public and private mode).

    -- hugh
    vladimir84 likes this.
  4. vladimir84

    vladimir84 Member

    Level: Community
    excellent work! everything's fine.
    FYI, I tried increasing it to 1024MB in PHP.ini, it still didn't work.
  5. cheesegrits

    cheesegrits Support Gopher Staff Member

    Level: Community
    So increasing the memory didn't work, but updating to the new github code did?

    -- hugh
  6. vladimir84

    vladimir84 Member

    Level: Community
    that is correct. the new github code works, while increasing the memory to 1024mb gave me a different error:
    This site can?t be reached
    The webpage at http://localhost/index.php/it/?opti...mid=75&rowid=105102&repeatcount=0&ajaxIndex=0 might be temporarily down or it may have moved permanently to a new web address.


    it's a virtual machine in virtualbox for a small office archive, running lubuntu, php7.1, (tested with both RAM 1GB and RAM 2GB). I ran the daily backup on a more powerful computer to make sure it wasn't a hardware issue.

    Hope it helps, if you need more information, don't hestitate to contact me.

Share This Page