Download of some files are stuck

Nextcloud version (eg, 29.0.5): 29.0.1
Operating system and version (eg, Ubuntu 29.04): Debian running Nextcloud:29.0.1-fpm docker image
Apache or nginx version (eg, Apache 2.4.25): nginx 1.25.5
PHP version (eg, 8.3): 8.2.20

The issue you are facing:
some files can be downloaded, others don’t.

I’ve tried using the web interface, the Nextcloud Sync app on windows and even mounted a davfs drive on Debian. None of these methods could get me some specific files downloaded.

Thoses files are images, which are shown great in the web interface, but I can’t save it on my computer using the “Download” drop down menu.

  • Using Firefox, the download start and fail at 0 bytes. Hitting retry advance the download a bit (31.4KB/35.9MB the first time, 10.2MB/35.9MB the second time, 18.6MB the third time, etc …)
  • Using the folder mounted in my Windows filesystem or my Linux davfs drive, the download start and freeze. I can hit “retry” on windows but it start over from the beginning. On Windows, I have an error 0x800701AA.

I have to add that only some files can’t be downloaded. Others can.

compose.yml.txt
mydomain.conf.txt
ssl.conf.txt

Even some non shared files seems to be affected.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

Put some image files in a Nextcloud folder shared with 6 people (me included) as a group

Using Firefox 126.0.1:
2. Browse to the file using the web interface
3. Hit “download” from the drop down menu

Using Nextcloud folder mounted by the Nextcloud Windows app OR using the davfs drive on Linux
2. Browse to the file using the OS file browser
3. Copy the file to a local folder

The output of your Nextcloud log in Admin > Logging:

Avertissement	no app in context	
Exception Transaction took 2.4787859916687s
"11 juin 2024, 17:05:27"	
Avertissement	cron	
Used memory grew by more than 10 MB when executing job OCA\UpdateNotification\BackgroundJob\UpdateAvailableNotifications (id: 12, arguments: null): 34.9 MB (before: 23.7 MB)
"11 juin 2024, 12:21:38"	
Avertissement	cron	
Used memory grew by more than 10 MB when executing job OCA\UpdateNotification\BackgroundJob\UpdateAvailableNotifications (id: 12, arguments: null): 34.9 MB (before: 23.7 MB)
"11 juin 2024, 12:21:38"	
Avertissement	no app in context	
Exception Transaction took 2.1242220401764s
"10 juin 2024, 23:54:09"	
Avertissement	no app in context	
Exception Transaction took 2.1242220401764s
"10 juin 2024, 23:54:09"	
Avertissement	no app in context	
Exception Transaction took 7.3902559280396s
"10 juin 2024, 13:39:07"	
Avertissement	no app in context	
Exception Transaction took 7.3902559280396s
"10 juin 2024, 13:39:07"	
Erreur	PHP	
Allowed memory size of 536870912 bytes exhausted (tried to allocate 28672 bytes) at /var/www/html/lib/private/legacy/OC_Image.php#559
"10 juin 2024, 13:30:07"	
Erreur	PHP	
Allowed memory size of 536870912 bytes exhausted (tried to allocate 28672 bytes) at /var/www/html/lib/private/legacy/OC_Image.php#559
"10 juin 2024, 13:30:07"	
Erreur	PHP	
Allowed memory size of 536870912 bytes exhausted (tried to allocate 28672 bytes) at /var/www/html/lib/private/legacy/OC_Image.php#559
"10 juin 2024, 13:30:07"	
Erreur	PHP	
Allowed memory size of 536870912 bytes exhausted (tried to allocate 28672 bytes) at /var/www/html/lib/private/legacy/OC_Image.php#559
"10 juin 2024, 13:30:07"	
Erreur	PHP	
Allowed memory size of 536870912 bytes exhausted (tried to allocate 28672 bytes) at /var/www/html/lib/private/legacy/OC_Image.php#559
"10 juin 2024, 13:30:06"

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "upgrade.disable-web": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "[domain.com]"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.1.1",
        "overwrite.cli.url": "https:\/\/[domain.com]",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance_window_start": 3,
        "default_phone_region": "FR",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_smtpauth": 1,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465 ",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 2,
        "overwritewebroot": "\/"
    }
}

The output of your Apache/nginx/system log in /var/log/____:

https://pastebin.com/TXptJbZW

Change this
"overwritewebroot": ""

(and since you’re running Docker, run occ config:list system inside the container to make sure it’s the full config).

The requests in your web logs that are broken - e.g. /index.phpajax/checksetup are weird. Can you even access setup checks?

I noticed you have another app of some sort in your web server config. What happens if you comment that location section out and restart Nginx? (for testing purposes).

Thanks for your reply. Here is the result of the occ config:list system command:

{
    "system": {
        "memcache.local": "\\OC\\Memcache\\APCu",
        "apps_paths": [
            {
                "path": "\/var\/www\/html\/apps",
                "url": "\/apps",
                "writable": false
            },
            {
                "path": "\/var\/www\/html\/custom_apps",
                "url": "\/custom_apps",
                "writable": true
            }
        ],
        "memcache.distributed": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "password": "***REMOVED SENSITIVE VALUE***",
            "port": 6379
        },
        "upgrade.disable-web": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "[DOMAIN]"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "29.0.1.1",
        "overwrite.cli.url": "https:\/\/[DOMAIN]",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "maintenance_window_start": 3,
        "default_phone_region": "FR",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_sendmailmode": "smtp",
        "mail_smtpauth": 1,
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpport": "465 ",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "loglevel": 2,
        "overwritewebroot": ""
    }
}

About the setup checks, that’s another weird thing. Sometimes I can, sometimes not. When I can’t, the message Vérification des problèmes de système et de sécurité. is running a long time (aprox 1 minute) and display that the setup couldn’t be verified. But, this morning everything is fine.

I’ve commented out the other service but it is not changing anything about the picture being downloaded. Even the check setup is working whether the other service’s proxy pass is commented out or not.

Thanks a lot for your help!

Hi,

I’m still investigating this issue. It appears that Firefox is showing a NS_ERROR_NET_PARTIAL_TRANSFER error in the network pannel of the web developpement tool.

I’ve put nginx logs in follow mode, when the download start and get stuck, we are getting those lines:

83.113.248.226 - MY_NAME [24/Jun/2024:10:58:30 +0200] "PROPFIND /remote.php/dav/files/MY_NAME/ HTTP/1.1" 207 252 "-" "Mozilla/5.0 (Windows) mirall/3.13.0stable-Win64 (build 20240423) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)" "-"

Then, shortly before the transfer abort (about 30 seconds after started):

83.113.248.226 - MY_NAME [24/Jun/2024:10:59:00 +0200] "GET /ocs/v2.php/apps/notifications/api/v2/notifications?format=json HTTP/1.1" 304 0 "-" "Mozilla/5.0 (Windows) mirall/3.13.0stable-Win64 (build 20240423) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)" "-"
83.113.248.226 - MY_NAME [24/Jun/2024:10:59:01 +0200] "GET /ocs/v2.php/apps/user_status/api/v1/user_status?format=json HTTP/1.1" 200 154 "-" "Mozilla/5.0 (Windows) mirall/3.13.0stable-Win64 (build 20240423) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)" "-"
83.113.248.226 - - [24/Jun/2024:10:59:06 +0200] "GET /remote.php/dav/files/MY_NAME/DSC_0578.png HTTP/2.0" 200 10794136 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
83.113.248.226 - - [24/Jun/2024:10:59:06 +0200] "GET /index.php/apps/files/preview-service-worker.js HTTP/2.0" 200 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
83.113.248.226 - - [24/Jun/2024:10:59:06 +0200] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/2.0" 200 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
83.113.248.226 - - [24/Jun/2024:10:59:06 +0200] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/2.0" 200 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
83.113.248.226 - - [24/Jun/2024:10:59:06 +0200] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/2.0" 200 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
83.113.248.226 - - [24/Jun/2024:10:59:06 +0200] "GET /csrftoken HTTP/2.0" 200 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
83.113.248.226 - - [24/Jun/2024:10:59:06 +0200] "GET /apps/files/api/v1/stats HTTP/2.0" 200 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"
83.113.248.226 - - [24/Jun/2024:10:59:06 +0200] "PUT /ocs/v2.php/apps/user_status/api/v1/heartbeat?format=json HTTP/2.0" 200 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0" "-"

On the nextcloud-app side:
Right after download start:

172.27.0.5 -  24/Jun/2024:11:02:18 +0200 "GET /index.php" 200
172.27.0.5 - MY_NAME 24/Jun/2024:11:02:30 +0200 "PROPFIND /remote.php" 207
172.27.0.5 -  24/Jun/2024:11:02:30 +0200 "PUT /ocs/v2.php" 200
172.27.0.5 -  24/Jun/2024:11:02:35 +0200 "GET /index.php" 200
172.27.0.5 - MY_NAME  24/Jun/2024:11:03:00 +0200 "PROPFIND /remote.php" 207
172.27.0.5 - MY_NAME  24/Jun/2024:11:03:00 +0200 "GET /ocs/v2.php" 304
172.27.0.5 - MY_NAME  24/Jun/2024:11:03:00 +0200 "GET /ocs/v2.php" 200
172.27.0.5 -  24/Jun/2024:11:02:17 +0200 "GET /remote.php" 200

When aborted:

172.27.0.5 - MY_NAME  24/Jun/2024:11:03:30 +0200 "PROPFIND /remote.php" 207
172.27.0.5 -  24/Jun/2024:11:03:36 +0200 "GET /index.php" 200
172.27.0.5 - MY_NAME  24/Jun/2024:11:04:00 +0200 "PROPFIND /remote.php" 207
172.27.0.5 - MY_NAME  24/Jun/2024:11:04:00 +0200 "GET /ocs/v2.php" 304
172.27.0.5 - MY_NAME  24/Jun/2024:11:04:00 +0200 "GET /ocs/v2.php" 200

Thanks again,

Hi, a bit more test here:

Somehow, after an nginx -s reload I am able to download a large chunk (or even the entire file) and then the download stop again.

I’ve added proxy_request_buffering off; in my nginx conf file (seen here: docker/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/proxy/uploadsize.conf at master · nextcloud/docker · GitHub) but the bug is still there.

I have a strong feeling that it’s a nginx configuration problem, but I’m using the one provided by NC documentation.

Cheers,

Hi,

I’ve upgraded my Nextcloud to 29.0.3, tried to download the exact same file. The download progress bar of firefox went to 33% and then stop again.

Cheers,

Hi,

I fired up an AIO docker instance on my rockpi today, copied the backup on it and still I can’t download the picture in question.

Cheers,

Hi,

It looks like the issue is hardware related. I’ve forced the ethernet interface in base 100 instead of gigabit and everything is now working. I am using a Rockpi 4. Maybe the ethernet interface is unstable.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.