skip to Main Content

This is my stack:

  • Azure App Service (P1V2 Plan)
  • Docker Container
  • php:7.4-apache base image
    apache2 config not changed
    php config not changed
  • Azure Storage Account "Standard", also tried "Premium"
    AzureFile mapped into subdir of document root.

I try to download a 75 MB file directly with apache2.

It works with Chrome Browser, but doesn’t work in Firefox and curl.

For testing I created two different files:

a 2 MB File works to download in Firefox. A 3 MB File doesn’t work in Firefox.

The download of the 75 MB file works if I don’t put it in the AzureFile directory but in another directory directly in the container.

It seems that the Azure Storage is responsible that the file can not be downloaded in Firefox and curl. But in Chrome it works for some reason.

Am I missing any configuration or is this usecase not supported?
How can I fix the download, that it works on all plattforms?

Edit:

curl output:

curl http://example.com/install/TheSetup.exe --output TheSetup.exe
  % Total    % Received % Xferd  Average Speed   Time    Time     
Time  Current
                                 Dload  Upload   Total   Spent  Left  Speed
  1 75.6M    1  988k    0     0  1937k      0  0:00:39 --:--:--  0:00:39 1937k
curl: (18) transfer closed with 78332760 bytes remaining to read

Firefox error:

Firefox is downloading a portion of the file but very soon the "Fehlgeschlagen" is appearing.

Firefox screenshot

2

Answers


  1. Chosen as BEST ANSWER

    There are two configuration settings for network storage mounted directories like NFS or SMB that also apply for this usecase of azure storage mounted in azure app service docker container:

    EnableSendfile Off
    EnableMMAP Off
    

    This can be set for the virtual host or per directory.

    See:

    https://httpd.apache.org/docs/2.4/mod/core.html#enablemmap https://httpd.apache.org/docs/2.4/mod/core.html#enablesendfile


  2. This issue may happen depending on your Windows version security software stops the downloads and Firefox always uses the temp folder to start the download in the background so large files can’t be able to download

    • If you are using extension, try to Disable or remove extensions via Tools -> Add-ons -> Extensions
    • Try to close the to close Firefox completely and delete the "compreg.dat" file from the Firefox profile folder
    • Otherwise, In new tab type about:config -> accept & continue and in that search box type browser. download in that you can see browser.Download.manager.ResumeOnWakeDelay change it as hundred thousand and browser.downloads.SaveLinkAsFilenameTimeout change it as 40 thousand and Enter may have possibilities to work

    For downloading in curl try using below :

    curl --location --request GET 'https://go.microsoft.com/fwlink/?linkid=2108834&Channel=Stable&language=en' --output foo.exe
    

    For your Reference :

    http://kb.mozillazine.org/Unable_to_save_or_download_files

    https://support.mozilla.org/en-US/kb/where-find-and-manage-downloaded-files-firefox

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search