Nextcloud AIO fails while uploading large files: "Error when assembling chunks, status code 0"

Nextcloud version: 24.0.4
Operating system and version: Debian11
Apache or nginx version: Apache2.4.54
PHP version: 8.0.22

The issue you are facing:
I installed Nextcloud all-in-one docker container yesterday, and it is working well, except when i try to upload large files: (zip-archive of 1.4 GB)

When I upload this file, it initially starts to upload slowly (~500kb/s), and eventually stops with the following message:

Error when assembling chunks, status code 0

Is this the first time you’ve seen this error?: N - repeatedly today

Steps to replicate it:

  1. Login to nc in browser (https://mypublicdomain) and open Files
  2. Click “Upload file” and select 1.4GB zip file
  3. Wait a few minutes

The output of your Nextcloud log in Admin > Logging: There are no logging entries today.

The output of your config.php file in /path/to/nextcloud

{
    "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
        },
        "overwritehost": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "***REMOVED SENSITIVE VALUE***"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "pgsql",
        "version": "24.0.4.1",
        "overwrite.cli.url": "https:\/\/***REMOVED SENSITIVE VALUE***\/",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "loglevel": "2",
        "log_type": "file",
        "logfile": "\/var\/www\/html\/data\/nextcloud.log",
        "log_rotate_size": "10485760",
        "log.condition": {
            "apps": [
                "admin_audit"
            ]
        },
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "enabledPreviewProviders": {
            "1": "OC\\Preview\\Image",
            "2": "OC\\Preview\\MarkDown",
            "3": "OC\\Preview\\MP3",
            "4": "OC\\Preview\\TXT",
            "5": "OC\\Preview\\OpenDocument",
            "6": "OC\\Preview\\Movie"
        },
        "enable_previews": true,
        "upgrade.disable-web": true,
        "mail_smtpmode": "smtp",
        "trashbin_retention_obligation": "auto, 30",
        "versions_retention_obligation": "auto, 30",
        "activity_expire_days": "30",
        "simpleSignUpLink.shown": false,
        "share_folder": "\/Shared",
        "tempdirectory": "\/mnt\/ncdata\/tmp\/",
        "one-click-instance": true,
        "one-click-instance.user-limit": 100,
        "htaccess.RewriteBase": "\/",
        "files_external_allow_create_new_local": false,
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "allow_local_remote_servers": true,
        "default_phone_region": "NL",
        "mail_smtpsecure": "tls",
        "mail_sendmailmode": "smtp",
        "mail_smtpport": "587",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauthtype": "LOGIN",
        "mail_smtpauth": 1,
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***"
    },
    "apps": {
        "accessibility": {
            "installed_version": "1.10.0",
            "types": "",
            "enabled": "yes"
        },
        "activity": {
            "installed_version": "2.16.0",
            "types": "filesystem",
            "enabled": "yes"
        },
        "admin_audit": {
            "installed_version": "1.14.0",
            "types": "logging",
            "enabled": "yes",
            "logfile": "\/var\/www\/html\/data\/audit.log"
        },
        "apporder": {
            "installed_version": "0.15.0",
            "types": "",
            "enabled": "yes"
        },
        "backgroundjob": {
            "lastjob": "7"
        },
        "calendar": {
            "installed_version": "3.5.0",
            "types": "",
            "enabled": "yes"
        },
        "circles": {
            "installed_version": "24.0.1",
            "types": "filesystem,dav",
            "enabled": "yes",
            "loopback_tmp_scheme": "https",
            "loopback_tmp_path": "\/",
            "maintenance_run": "0",
            "maintenance_update": "{\"3\":1662896387,\"2\":1662899987,\"1\":1662899987}"
        },
        "cloud_federation_api": {
            "installed_version": "1.7.0",
            "types": "filesystem",
            "enabled": "yes"
        },
        "comments": {
            "installed_version": "1.14.0",
            "types": "logging",
            "enabled": "yes"
        },
        "contacts": {
            "installed_version": "4.2.0",
            "types": "dav",
            "enabled": "yes"
        },
        "contactsinteraction": {
            "installed_version": "1.5.0",
            "types": "dav",
            "enabled": "yes"
        },
        "core": {
            "installedat": "1662830875.0979",
            "lastupdatedat": "1662830875.1169",
            "vendor": "nextcloud",
            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php",
            "public_files": "files_sharing\/public.php",
            "backgroundjobs_mode": "cron",
            "lastcron": "1662899987",
            "emailTestSuccessful": "1",
            "theming.variables": "b92d206521717ac032f8aa58d3c7ff2f"
        },
        "dashboard": {
            "installed_version": "7.4.0",
            "types": "",
            "enabled": "yes"
        },
        "dav": {
            "installed_version": "1.22.0",
            "types": "filesystem",
            "enabled": "yes"
        },
        "deck": {
            "installed_version": "1.7.1",
            "types": "dav",
            "enabled": "yes"
        },
        "federatedfilesharing": {
            "installed_version": "1.14.0",
            "types": "",
            "enabled": "yes"
        },
        "federation": {
            "installed_version": "1.14.0",
            "types": "authentication",
            "enabled": "yes"
        },
        "files": {
            "installed_version": "1.19.0",
            "types": "filesystem",
            "enabled": "yes"
        },
        "files_pdfviewer": {
            "installed_version": "2.5.0",
            "types": "",
            "enabled": "yes"
        },
        "files_rightclick": {
            "installed_version": "1.3.0",
            "types": "",
            "enabled": "yes"
        },
        "files_sharing": {
            "installed_version": "1.16.2",
            "types": "filesystem",
            "enabled": "yes"
        },
        "files_trashbin": {
            "installed_version": "1.14.0",
            "types": "filesystem,dav",
            "enabled": "yes"
        },
        "files_versions": {
            "installed_version": "1.17.0",
            "types": "filesystem,dav",
            "enabled": "yes"
        },
        "files_videoplayer": {
            "installed_version": "1.13.0",
            "types": "",
            "enabled": "yes"
        },
        "firstrunwizard": {
            "installed_version": "2.13.0",
            "types": "logging",
            "enabled": "yes"
        },
        "logreader": {
            "installed_version": "2.9.0",
            "types": "",
            "enabled": "yes"
        },
        "lookup_server_connector": {
            "installed_version": "1.12.0",
            "types": "authentication",
            "enabled": "yes"
        },
        "nextcloud-aio": {
            "installed_version": "0.2.0",
            "types": "",
            "enabled": "yes"
        },
        "nextcloud_announcements": {
            "installed_version": "1.13.0",
            "types": "logging",
            "enabled": "yes",
            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200"
        },
        "notifications": {
            "installed_version": "2.12.0",
            "types": "logging",
            "enabled": "yes"
        },
        "notify_push": {
            "installed_version": "0.4.0",
            "types": "filesystem",
            "enabled": "yes",
            "base_endpoint": "***REMOVED SENSITIVE VALUE***"
        },
        "oauth2": {
            "installed_version": "1.12.0",
            "types": "authentication",
            "enabled": "yes"
        },
        "password_policy": {
            "installed_version": "1.14.0",
            "types": "authentication",
            "enabled": "yes"
        },
        "photos": {
            "installed_version": "1.6.0",
            "types": "",
            "enabled": "yes"
        },
        "preview": {
            "jpeg_quality": "60"
        },
        "privacy": {
            "installed_version": "1.8.0",
            "types": "",
            "enabled": "yes"
        },
        "provisioning_api": {
            "installed_version": "1.14.0",
            "types": "prevent_group_restriction",
            "enabled": "yes"
        },
        "recommendations": {
            "installed_version": "1.3.0",
            "types": "",
            "enabled": "yes"
        },
        "richdocuments": {
            "installed_version": "6.2.0",
            "types": "prevent_group_restriction",
            "enabled": "yes",
            "wopi_url": "***REMOVED SENSITIVE VALUE***",
            "public_wopi_url": "***REMOVED SENSITIVE VALUE***"
        },
        "serverinfo": {
            "installed_version": "1.14.0",
            "types": "",
            "enabled": "yes",
            "cached_count_storages": "2",
            "cached_count_filecache": "673"
        },
        "settings": {
            "installed_version": "1.6.0",
            "types": "",
            "enabled": "yes"
        },
        "sharebymail": {
            "installed_version": "1.14.0",
            "types": "filesystem",
            "enabled": "yes"
        },
        "spreed": {
            "installed_version": "14.0.4",
            "types": "dav,prevent_group_restriction",
            "project_access_invalidated": "1",
            "enabled": "yes",
            "stun_servers": "***REMOVED SENSITIVE VALUE***",
            "turn_servers": "***REMOVED SENSITIVE VALUE***",
            "signaling_servers": "***REMOVED SENSITIVE VALUE***",
            "has_reference_id": "yes"
        },
        "support": {
            "installed_version": "1.7.0",
            "types": "session",
            "enabled": "yes"
        },
        "survey_client": {
            "installed_version": "1.12.0",
            "types": "",
            "enabled": "yes"
        },
        "systemtags": {
            "installed_version": "1.14.0",
            "types": "logging",
            "enabled": "yes"
        },
        "tasks": {
            "installed_version": "0.14.4",
            "types": "",
            "enabled": "yes"
        },
        "text": {
            "installed_version": "3.5.1",
            "types": "dav",
            "enabled": "yes"
        },
        "theming": {
            "installed_version": "1.15.0",
            "types": "logging",
            "enabled": "yes"
        },
        "twofactor_backupcodes": {
            "installed_version": "1.13.0",
            "types": "",
            "enabled": "yes"
        },
        "twofactor_totp": {
            "installed_version": "6.4.0",
            "types": "",
            "enabled": "yes"
        },
        "user_status": {
            "installed_version": "1.4.0",
            "types": "",
            "enabled": "yes"
        },
        "viewer": {
            "installed_version": "1.8.0",
            "types": "",
            "enabled": "yes"
        },
        "weather_status": {
            "installed_version": "1.4.0",
            "types": "",
            "enabled": "yes"
        },
        "workflowengine": {
            "installed_version": "2.6.0",
            "types": "filesystem",
            "enabled": "yes"
        }
    }
}

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

error log

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.8. Set the 'ServerName' directive globally to suppress this message

There is lots of output in: other_vhosts_access.log. Is that relevant?

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors:

Not found in /var/www/

Hi, are you running AIO behind a reverse proxy?

Hi!
Not running behind a reverse proxy. I’m only running the AIO container with the following command on a dedicated debian vm:

 sudo docker run \
 --sig-proxy=false \
 --name nextcloud-aio-mastercontainer \
 --restart always \
 --publish 80:80 \
 --publish 8080:8080 \
 --publish 8443:8443 \
 --volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config \
 --volume /var/run/docker.sock:/var/run/docker.sock:ro \
 nextcloud/all-in-one:latest

My domain is proxied through cloudflare though.

Did the error happen when trying to upload the file using the web interface or the ios/android/desktop app? And do you have ClamAV enabled? Also what are the specs of this server?

It happens when uploading through web interface, I haven’t tried any client apps.

ClamAV is not added (only Collabora and Talk).

Specs of the VM running the container:
-memory: 4GiB
-Processors: 4 (2sockets, 2cores)
-Virtual harddisk: 40GB (qcow2)

Hm… The specs sound good. Is there really no html status code in the error message? Also I cannot reproduce this so it might be due to some Cloudflare settings… I found this: timeout - Is it possible to increase CloudFlare time-out? - Stack Overflow

1 Like

I Just noticed that downloading files is just as slow as uploading (less than 500kB/s)! This is a new issue maybe.

I only saw the error message pop up once, but it clearly said “status code 0”. The other times that i tried and failed an upload I wasn’t watching the screen.

I did eventually have one successful upload of a 1.3BG file, but attempts have failed again since then.

Still looking at cloudflare for clues.

Seems like something is modifying the status code then since this is definitely not a valid status code and never saw this happening with Nextcloud…

Cannot reproduce this either…

Makes sense!

1 Like

It looks like the upload fails and low up/download speeds are a Cloudflare related problem!

I just installed a new nextcloud aoi instance following the exact same steps and setup as before, but excluding cloudflare proxy. Uploads work fine, and up/download speeds are above 5MB/s!

Thanks for your help!

1 Like