Error when assembling chunks, status code 502

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2):
Operating system and version (eg, Ubuntu 17.04): Linux 5.0.0-1032-azure #34-Ubuntu SMP Mon Feb 10 19:37:25 UTC 2020 x86_64

Apache or nginx version (eg, Apache 2.4.25): nginx/1.17.9
PHP version (eg, 7.1): 7.3.15

The issue you are facing:
I am getting “Error when assembling chunks, status code 502” when I upload >1GB files to my external storage. The external storage is using SMB attaching to Azure file storage.

Is this the first time you’ve seen this error? (Y/N):
N. Always happen when I upload a large file.

Steps to replicate it:

  1. Click upload
  2. Select a >1GB file to upload.

The output of your Nextcloud log in Admin > Logging:
There is no error or warning from the nextcloud.log.

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

{
    "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
        }
    ],
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "data.greaterdata.com.au"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "pgsql",
    "version": "18.0.2.2",
    "overwrite.cli.url": "http:\/\/data.greaterdata.com.au",
    "overwriteprotocol": "https",
    "skeletondirectory": "",
    "simpleSignUpLink.shown": false,
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "installed": true,
    "mail_smtpmode": "smtp",
    "mail_smtpsecure": "ssl",
    "mail_sendmailmode": "smtp",
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpauthtype": "LOGIN",
    "mail_smtpauth": 1,
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "465",
    "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
    "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
    "twofactor_enforced": "true",
    "twofactor_enforced_groups": [
        "tech"
    ],
    "twofactor_enforced_excluded_groups": []
}

The output of your Apache/nginx/system log in /var/log/____:
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:53:18 +0000] “PUT /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/1153433600 HTTP/2.0” 201 0 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:53:23 +0000] “PUT /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/1163919360 HTTP/2.0” 201 0 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:53:31 +0000] “PUT /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/1174405120 HTTP/2.0” 201 0 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:53:37 +0000] “PUT /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/1184890880 HTTP/2.0” 201 0 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:53:43 +0000] “PUT /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/1195376640 HTTP/2.0” 201 0 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:53:47 +0000] “GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0” 200 74 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:53:48 +0000] “PUT /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/1205862400 HTTP/2.0” 201 0 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:53:53 +0000] “PUT /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/1216348160 HTTP/2.0” 201 0 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:53:59 +0000] “PUT /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/1226833920 HTTP/2.0” 201 0 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:54:04 +0000] “PUT /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/1237319680 HTTP/2.0” 201 0 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:54:10 +0000] “PUT /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/1247805440 HTTP/2.0” 201 0 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:54:13 +0000] “PUT /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/1258291200 HTTP/2.0” 201 0 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:54:17 +0000] “GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0” 200 74 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:54:47 +0000] “GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0” 200 74 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | 2020/03/27 01:55:13 [warn] 141#141: *5850 upstream server temporarily disabled while reading response header from upstream, client: 10.0.0.2, server: data.example.com.au, request: “MOVE /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/.file HTTP/2.0”, upstream: “http://10.0.4.8:80/remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/.file”, host: “data.example.com.au”
nginx.1 | client: 10.0.0.2, server: data.example.com.au, request: “MOVE /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/.file HTTP/2.0”, upstream: “http://data.example.com.au/remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/.file”, host: “data.example.com.au”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:55:13 +0000] “MOVE /remote.php/dav/uploads/admin/web-file-upload-fac0a08e9779ff12e74dcb2344a7c096-1585273340869/.file HTTP/2.0” 502 559 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”
nginx.1 | 2020/03/27 01:55:16 [error] 141#141: *5850 no live upstreams while connecting to upstream, client: 10.0.0.2, server: data.example.com.au, request: “GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0”, upstream: “http://data.example.com.au/ocs/v2.php/apps/notifications/api/v2/notifications”, host: “data.example.com.au”
nginx.1 | data.example.com.au 10.0.0.2 - - [27/Mar/2020:01:55:16 +0000] “GET /ocs/v2.php/apps/notifications/api/v2/notifications HTTP/2.0” 502 559 “-” “Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.149 Safari/537.36”