Gateway error using S3Object storage

[details=“Support intro”]

When using S3Object storage, i get timeouts everytime the upload isn’t fast enough. If i throttle upload at around 200mbps, i get “OCA\DAV\Connector\Sabre\Exception\BadGateway: Error uploading to S3 bucket”

My config list is below. I have tried adjusting following numbers, nothing worked as of yet:

…3rdparty/aws/aws-sdk-php/src/S3/MultipartUploader.php

const PART_MIN_SIZE = 5242880; 

const PART_MAX_SIZE = 52428800; 

const PART_MAX_NUM = 100000; 
sudo -u apache php occ config:list 

{ 

    "system": { 

        "instanceid": "***REMOVED SENSITIVE VALUE***", 

        "passwordsalt": "***REMOVED SENSITIVE VALUE***", 

        "secret": "***REMOVED SENSITIVE VALUE***", 

        "trusted_domains": [ 

            "domain1", 

            "domain2" 

        ], 

        "datadirectory": "***REMOVED SENSITIVE VALUE***", 

        "dbtype": "mysql", 

        "version": "25.0.4.1", 

        "overwrite.cli.url": "https:\/\/fqdn", 

        "dbname": "***REMOVED SENSITIVE VALUE***", 

        "dbhost": "***REMOVED SENSITIVE VALUE***", 

        "dbport": "", 

        "dbtableprefix": "oc_", 

        "mysql.utf8mb4": true, 

        "dbuser": "***REMOVED SENSITIVE VALUE***", 

        "dbpassword": "***REMOVED SENSITIVE VALUE***", 

        "installed": true, 

        "objectstore": { 

            "class": "\\OC\\Files\\ObjectStore\\S3", 

            "arguments": { 

                "bucket": "nextcloud", 

                "autocreate": false, 

                "key": "***REMOVED SENSITIVE VALUE***", 

                "secret": "***REMOVED SENSITIVE VALUE***", 

                "hostname": "s3.hostname", 

                "port": 443, 

                "use_ssl": true, 

                "region": "optional", 

                "use_path_style": true 

            } 

        }, 

        "memcache.local": "\\OC\\Memcache\\APCu", 

        "memcache.distributed": "\\OC\\Memcache\\Redis", 

        "memcache.locking": "\\OC\\Memcache\\Redis", 

        "redis": { 

            "host": "***REMOVED SENSITIVE VALUE***", 

            "port": 6379, 

            "dbindex": 1, 

            "timeout": 6, 

            "prefix": "nc" 

        }, 

        "maintenance": false, 

        "loglevel": 2, 

        "default_language": "sl", 

        "mail_from_address": "***REMOVED SENSITIVE VALUE***", 

        "mail_smtpmode": "smtp", 

        "mail_sendmailmode": "smtp", 

        "mail_domain": "***REMOVED SENSITIVE VALUE***", 

        "mail_smtphost": "***REMOVED SENSITIVE VALUE***", 

        "mail_smtpport": "25" 

    }, 

    "apps": { 

        "activity": { 

            "enabled": "yes", 

            "installed_version": "2.17.0", 

            "types": "filesystem" 

        }, 

        "backgroundjob": { 

            "lastjob": "358" 

        }, 

        "bruteforcesettings": { 

            "enabled": "yes", 

            "installed_version": "2.5.0", 

            "types": "" 

        }, 

        "circles": { 

            "enabled": "yes", 

            "installed_version": "25.0.0", 

            "loopback_tmp_scheme": "https", 

            "maintenance_run": "0", 

            "maintenance_update": "{\"maximum\":3,\"3\":1687149001,\"2\":1687152002,\"1\":1687152002,\"4\":1678327202,\"5\":1678330801}", 

            "migration_22": "1", 

            "migration_run": "0", 

            "types": "filesystem,dav" 

        }, 

        "cloud_federation_api": { 

            "enabled": "yes", 

            "installed_version": "1.8.0", 

            "types": "filesystem" 

        }, 

        "comments": { 

            "enabled": "yes", 

            "installed_version": "1.15.0", 

            "types": "logging" 

        }, 

        "contactsinteraction": { 

            "enabled": "yes", 

            "installed_version": "1.6.0", 

            "types": "dav" 

        }, 

        "core": { 

            "backgroundjobs_mode": "cron", 

            "emailTestSuccessful": "1", 

            "installed.bundles": "[\"CoreBundle\"]", 

            "installedat": "1678267245.3627", 

            "lastcron": "1687152002", 

            "lastupdateResult": "{\"version\":\"25.0.7.1\",\"versionstring\":\"Nextcloud 25.0.7\",\"url\":\"https:\\\/\\\/download.nextcloud.com\\\/server\\\/releases\\\/nextcloud-25.0.7.zip\",\"web\":\"https:\\\/\\\/docs.nextcloud.com\\\/server\\\/25\\\/admin_manual\\\/maintenance\\\/upgrade.html\",\"changes\":\"https:\\\/\\\/updates.nextcloud.com\\\/changelog_server\\\/?version=25.0.7\",\"autoupdater\":\"1\",\"eol\":\"0\"}", 

            "lastupdatedat": "1687078580", 

            "moveavatarsdone": "yes", 

            "oc.integritycheck.checker": "[]", 

            "previewsCleanedUp": "1", 

            "public_files": "files_sharing\/public.php", 

            "public_webdav": "dav\/appinfo\/v1\/publicwebdav.php", 

            "theming.variables": "b92d206521717ac032f8aa58d3c7ff2f", 

            "vendor": "nextcloud" 

        }, 

        "dashboard": { 

            "enabled": "yes", 

            "installed_version": "7.5.0", 

            "types": "" 

        }, 

        "dav": { 

            "buildCalendarReminderIndex": "yes", 

            "buildCalendarSearchIndex": "yes", 

            "chunks_migrated": "1", 

            "enabled": "yes", 

            "generateBirthdayCalendar": "no", 

            "installed_version": "1.24.0", 

            "regeneratedBirthdayCalendarsForYearFix": "yes", 

            "sendEventReminders": "no", 

            "sendInvitations": "no", 

            "types": "filesystem" 

        }, 

        "deck": { 

            "enabled": "yes", 

            "installed_version": "1.8.5", 

            "types": "dav" 

        }, 

        "federatedfilesharing": { 

            "enabled": "yes", 

            "installed_version": "1.15.0", 

            "types": "" 

        }, 

        "federation": { 

            "enabled": "yes", 

            "installed_version": "1.15.0", 

            "types": "authentication" 

        }, 

        "files": { 

            "default_quota": "5GB", 

            "enabled": "yes", 

            "installed_version": "1.20.1", 

            "max_chunk_size": "0", 

            "types": "filesystem" 

        }, 

        "files_pdfviewer": { 

            "enabled": "yes", 

            "installed_version": "2.6.0", 

            "types": "" 

        }, 

        "files_rightclick": { 

            "enabled": "yes", 

            "installed_version": "1.4.0", 

            "types": "" 

        }, 

        "files_sharing": { 

            "enabled": "yes", 

            "installed_version": "1.17.0", 

            "types": "filesystem" 

        }, 

        "files_trashbin": { 

            "enabled": "yes", 

            "installed_version": "1.15.0", 

            "types": "filesystem,dav" 

        }, 

        "files_versions": { 

            "enabled": "yes", 

            "installed_version": "1.18.0", 

            "types": "filesystem,dav" 

        }, 

        "firstrunwizard": { 

            "enabled": "yes", 

            "installed_version": "2.14.0", 

            "types": "logging" 

        }, 

        "logreader": { 

            "enabled": "yes", 

            "installed_version": "2.10.0", 

            "types": "" 

        }, 

        "lookup_server_connector": { 

            "enabled": "yes", 

            "installed_version": "1.13.0", 

            "types": "authentication" 

        }, 

        "nextcloud_announcements": { 

            "enabled": "yes", 

            "installed_version": "1.14.0", 

            "pub_date": "Thu, 24 Oct 2019 00:00:00 +0200", 

            "types": "logging" 

        }, 

        "notifications": { 

            "enabled": "yes", 

            "installed_version": "2.13.1", 

            "types": "logging" 

        }, 

        "oauth2": { 

            "enabled": "yes", 

            "installed_version": "1.13.0", 

            "types": "authentication" 

        }, 

        "onlyoffice": { 

            "DocumentServerInternalUrl": "", 

            "DocumentServerUrl": "https:\/\/nc-tvm-oo1.arnes.si\/", 

            "StorageUrl": "", 

            "demo": "{\"available\":true,\"enabled\":false,\"start\":{\"date\":\"2023-05-17 09:40:56.661188\",\"timezone_type\":3,\"timezone\":\"UTC\"}}", 

            "enabled": "yes", 

            "installed_version": "7.8.0", 

            "jwt_secret": "secret", 

            "settings_error": "", 

            "types": "prevent_group_restriction", 

            "verify_peer_off": "false" 

        }, 

        "password_policy": { 

            "enabled": "yes", 

            "installed_version": "1.15.0", 

            "types": "authentication" 

        }, 

        "photos": { 

            "enabled": "yes", 

            "installed_version": "2.0.1", 

            "types": "dav,authentication" 

        }, 

        "privacy": { 

            "enabled": "yes", 

            "installed_version": "1.9.0", 

            "types": "" 

        }, 

        "provisioning_api": { 

            "enabled": "yes", 

            "installed_version": "1.15.0", 

            "types": "prevent_group_restriction" 

        }, 

        "recommendations": { 

            "enabled": "yes", 

            "installed_version": "1.4.0", 

            "types": "" 

        }, 

        "related_resources": { 

            "enabled": "yes", 

            "installed_version": "1.0.4", 

            "types": "" 

        }, 

        "serverinfo": { 

            "cached_count_filecache": "2358", 

            "cached_count_storages": "9", 

            "enabled": "yes", 

            "installed_version": "1.15.0", 

            "types": "" 

        }, 

        "settings": { 

            "enabled": "yes", 

            "installed_version": "1.7.0", 

            "types": "" 

        }, 

        "sharebymail": { 

            "enabled": "yes", 

            "installed_version": "1.15.0", 

            "types": "filesystem" 

        }, 

        "support": { 

            "SwitchUpdaterServerHasRun": "yes", 

            "enabled": "yes", 

            "installed_version": "1.8.0", 

            "types": "session" 

        }, 

        "survey_client": { 

            "enabled": "yes", 

            "installed_version": "1.13.0", 

            "types": "" 

        }, 

        "systemtags": { 

            "enabled": "yes", 

            "installed_version": "1.15.0", 

            "types": "logging" 

        }, 

        "text": { 

            "enabled": "yes", 

            "installed_version": "3.6.0", 

            "types": "dav" 

        }, 

        "theming": { 

            "cachebuster": "26", 

            "disable-user-theming": "yes", 

            "enabled": "yes", 

            "installed_version": "2.0.1", 

            "name": "Nextcloud", 

            "slogan": "***REMOVED SENSITIVE VALUE***", 

            "types": "logging", 

            "url": "***REMOVED SENSITIVE VALUE***" 

        }, 

        "twofactor_backupcodes": { 

            "enabled": "yes", 

            "installed_version": "1.14.0", 

            "types": "" 

        }, 

        "updatenotification": { 

            "core": "25.0.7.1", 

            "enabled": "yes", 

            "installed_version": "1.15.0", 

            "types": "", 

            "update_check_errors": "0" 

        }, 

        "user_ldap": { 

            "background_sync_interval": "1800", 

            "enabled": "no", 

            "installed_version": "1.15.0", 

            "s01_lastChange": "1684927176", 

            "s01has_memberof_filter_support": "0", 

            "s01home_folder_naming_rule": "", 

            "s01last_jpegPhoto_lookup": "0", 

            "s01ldap_agent_password": "***REMOVED SENSITIVE VALUE***", 

            "s01ldap_attributes_for_group_search": "", 

            "s01ldap_attributes_for_user_search": "", 

            "s01ldap_backup_host": "", 

            "s01ldap_backup_port": "", 

            "s01ldap_base": "", 

            "s01ldap_base_groups": "", 

            "s01ldap_base_users": "", 

            "s01ldap_cache_ttl": "600", 

            "s01ldap_configuration_active": "0", 

            "s01ldap_connection_timeout": "15", 

            "s01ldap_default_ppolicy_dn": "", 

            "s01ldap_display_name": "displayName", 

            "s01ldap_dn": "", 

            "s01ldap_dynamic_group_member_url": "", 

            "s01ldap_email_attr": "", 

            "s01ldap_experienced_admin": "0", 

            "s01ldap_expert_username_attr": "", 

            "s01ldap_expert_uuid_group_attr": "", 

            "s01ldap_expert_uuid_user_attr": "", 

            "s01ldap_ext_storage_home_attribute": "", 

            "s01ldap_gid_number": "gidNumber", 

            "s01ldap_group_display_name": "cn", 

            "s01ldap_group_filter": "", 

            "s01ldap_group_filter_mode": "0", 

            "s01ldap_group_member_assoc_attribute": "", 

            "s01ldap_groupfilter_groups": "", 

            "s01ldap_groupfilter_objectclass": "", 

            "s01ldap_host": "", 

            "s01ldap_login_filter": "", 

            "s01ldap_login_filter_mode": "0", 

            "s01ldap_loginfilter_attributes": "", 

            "s01ldap_loginfilter_email": "0", 

            "s01ldap_loginfilter_username": "1", 

            "s01ldap_matching_rule_in_chain_state": "unknown", 

            "s01ldap_nested_groups": "0", 

            "s01ldap_override_main_server": "", 

            "s01ldap_paging_size": "500", 

            "s01ldap_port": "", 

            "s01ldap_quota_attr": "", 

            "s01ldap_quota_def": "", 

            "s01ldap_tls": "0", 

            "s01ldap_turn_off_cert_check": "0", 

            "s01ldap_turn_on_pwd_change": "0", 

            "s01ldap_user_avatar_rule": "default", 

            "s01ldap_user_display_name_2": "", 

            "s01ldap_user_filter_mode": "0", 

            "s01ldap_userfilter_groups": "", 

            "s01ldap_userfilter_objectclass": "", 

            "s01ldap_userlist_filter": "", 

            "s01use_memberof_to_detect_membership": "1", 

            "types": "authentication" 

        }, 

        "user_saml": { 

            "enabled": "yes", 

            "general-allow_multiple_user_back_ends": "1", 

            "general-use_saml_auth_for_desktop": "1", 

            "installed_version": "5.2.0", 

            "type": "saml", 

            "types": "authentication" 

        }, 

        "user_status": { 

            "enabled": "yes", 

            "installed_version": "1.5.0", 

            "types": "" 

        }, 

        "viewer": { 

            "enabled": "yes", 

            "installed_version": "1.9.0", 

            "types": "" 

        }, 

        "weather_status": { 

            "enabled": "yes", 

            "installed_version": "1.5.0", 

            "types": "" 

        }, 

        "workflowengine": { 

            "enabled": "yes", 

            "installed_version": "2.7.0", 

            "types": "filesystem" 

        } 

    } 

} 

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 : 25.0.4
Operating system and version : AlmaLinux 8.8
Apache version (eg, Apache 2.4.25): Apache/2.4.37 (AlmaLinux)
PHP version : PHP 8.1.20

The issue you are facing:

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

Steps to replicate it:

  1. Upload larger file (2GB+ at lower speed)
  2. Get error

config.php

<?php
$CONFIG = array (
  'instanceid' => 'XXX',
  'passwordsalt' => 'XX',
  'secret' => 'XXX',
  'trusted_domains' => 
  array (
    0 => 'XX',
    1 => 'XX',
  ),
  'datadirectory' => '/opt/nextcloud/s3data/',
  'dbtype' => 'mysql',
  'version' => '25.0.4.1',
  'overwrite.cli.url' => 'XXX',
  'dbname' => 'XXXX',
  'dbhost' => 'XX',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXX',
  'dbpassword' => 'XXX',
  'installed' => true,
  'objectstore' => 
  array (
    'class' => '\\OC\\Files\\ObjectStore\\S3',
    'arguments' => 
    array (
      'bucket' => 'nextcloud',
      'autocreate' => false,
      'key' => 'XXXXX',
      'secret' => 'XXXX',
      'hostname' => 'XXX',
      'port' => 443,
      'use_ssl' => true,
      'region' => 'optional',
      'use_path_style' => true,
    ),
  ),
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => 'XXX',
    'port' => XX,
    'dbindex' => 1,
    'timeout' => 6,
    'prefix' => 'nc',
  ),
  'maintenance' => false,
  'log_type' => 'file',
  'logfile' => '/var/log/httpd/nextcloud/error.log',
  'loglevel' => 3,
  'log_rotate_size' => 1048576000,
  'default_language' => 'sl',
  'mail_from_address' => 'admin',
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_domain' => 'XXX',
  'mail_smtphost' => 'XXX',
  'mail_smtpport' => '25',
);

The output of your Nextcloud log in Admin > Logging:

{
  "reqId": "ZJl0kWlp7X@@1ZYqRMvO8AAAxwY",
  "level": 3,
  "time": "2023-06-26T11:53:05+00:00",
  "remoteAddr": "XXX",
  "user": "XXX",
  "app": "objectstore",
  "method": "PUT",
  "url": "/remote.php/webdav/4g.img",
  "message": "Could not update object urn:oid:4109 for files/4g.img",
  "userAgent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36",
  "version": "25.0.4.1",
  "exception": {
    "Exception": "OCA\\DAV\\Connector\\Sabre\\Exception\\BadGateway",
    "Message": "Error while uploading to S3 bucket",
    "Code": 0,
    "Trace": [...

How, specifically, are you implementing the throttling?

Can you provide the entire stack trace?

Also, what platform (or provider) is the S3 backend? And how are you doing this uploads (from the Web interface or…)?

Also:

const PART_MAX_NUM = 100000; 

Any particular reason you messed with these? These are really low-level parameters and overriding them at this level could create some problems since the higher level wrappers around this API at the NC level won’t know about these changes. Also the PART_MAX_NUM parameter can’t be over 10k for any known S3 implementation. :slight_smile:

Greetings,

Throttling is applied through the browser’s network dev tool - https://thegeekpage.com/limit-your-upload-speed-in-google-chrome/

I am not connected to AWS but instead connecting to own S3 infrastructure (fqdn hidden in stack trace)

I have tried adjusting these values after reading about similar issues in

I have tried reverting back to the defaults for my version and even did integrity check to be sure the hashes of these files match, but the issue persisted.
There is also an error in value of 100k. I re-checked and the current state is 10k, so i must’ve made a mistake when copying.

The full stack trace of latest type of error is:

Summary
{"reqId":"ZJrRIBAjrCVbVIov-mVQkQAAhww","level":3,"time":"2023-06-27T12:12:35+00:00","remoteAddr":"IP","user":"hidden","app":"webdav","method":"PUT","url":"/remote.php/webdav/3IMG_0960.MOV","message":"Error while uploading to S3 bucket","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36","version":"25.0.4.1","exception":{"Exception":"OCA\\DAV\\Connector\\Sabre\\Exception\\BadGateway","Message":"Error while uploading to S3 bucket","Code":0,"Trace":[{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/ObjectStore/S3ObjectTrait.php","line":162,"function":"writeMultiPart","class":"OC\\Files\\ObjectStore\\S3","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/ObjectStore/ObjectStoreStorage.php","line":491,"function":"writeObject","class":"OC\\Files\\ObjectStore\\S3","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/Storage/Wrapper/Wrapper.php","line":647,"function":"writeStream","class":"OC\\Files\\ObjectStore\\ObjectStoreStorage","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/Storage/Wrapper/Wrapper.php","line":647,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/Storage/Wrapper/Wrapper.php","line":647,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/apps/dav/lib/Connector/Sabre/File.php","line":248,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/apps/dav/lib/Connector/Sabre/Directory.php","line":151,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/apps/dav/appinfo/v1/webdav.php","line":85,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/remote.php","line":171,"args":["/vg_DataDbWeb/vol_web/s3nc_2504/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/ObjectStore/S3ObjectTrait.php","Line":137,"Previous":{"Exception":"Aws\\S3\\Exception\\S3MultipartUploadException","Message":"An exception occurred while uploading parts to a multipart upload. The following parts had errors:\n- Part 6: Error executing \"UploadPart\" on \"https://s3fqdn/nextcloud/urn%3Aoid%3A56858?partNumber=6&uploadId=2~LrjTFOEwPrfSrc1vZDAifsOoI3T_3dA\"; AWS HTTP error: cURL error 55: SSL_write() returned SYSCALL, errno = 32 (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://s3fqdn/nextcloud/urn%3Aoid%3A56858?partNumber=6&uploadId=2~LrjTFOEwPrfSrc1vZDAifsOoI3T_3dA  (server): 100 Continue - \n","Code":0,"Trace":[{"function":"Aws\\Multipart\\{closure}","class":"Aws\\Multipart\\AbstractUploadManager","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Coroutine.php","line":140,"function":"send","class":"Generator","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":204,"function":"_handleSuccess","class":"GuzzleHttp\\Promise\\Coroutine","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":153,"function":"callHandler","class":"GuzzleHttp\\Promise\\Promise","type":"::"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/TaskQueue.php","line":48,"function":"GuzzleHttp\\Promise\\{closure}","class":"GuzzleHttp\\Promise\\Promise","type":"::","args":["*** sensitive parameters replaced ***"]},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php","line":159,"function":"run","class":"GuzzleHttp\\Promise\\TaskQueue","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/guzzle/src/Handler/CurlMultiHandler.php","line":184,"function":"tick","class":"GuzzleHttp\\Handler\\CurlMultiHandler","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":248,"function":"execute","class":"GuzzleHttp\\Handler\\CurlMultiHandler","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":224,"function":"invokeWaitFn","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":269,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":226,"function":"invokeWaitList","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":269,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":226,"function":"invokeWaitList","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":62,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Coroutine.php","line":67,"function":"wait","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":248,"function":"GuzzleHttp\\Promise\\{closure}","class":"GuzzleHttp\\Promise\\Coroutine","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":224,"function":"invokeWaitFn","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":269,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":226,"function":"invokeWaitList","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/guzzlehttp/promises/src/Promise.php","line":62,"function":"waitIfPending","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/aws/aws-sdk-php/src/Multipart/AbstractUploadManager.php","line":83,"function":"wait","class":"GuzzleHttp\\Promise\\Promise","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/ObjectStore/S3ObjectTrait.php","line":129,"function":"upload","class":"Aws\\Multipart\\AbstractUploadManager","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/ObjectStore/S3ObjectTrait.php","line":162,"function":"writeMultiPart","class":"OC\\Files\\ObjectStore\\S3","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/ObjectStore/ObjectStoreStorage.php","line":491,"function":"writeObject","class":"OC\\Files\\ObjectStore\\S3","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/Storage/Wrapper/Wrapper.php","line":647,"function":"writeStream","class":"OC\\Files\\ObjectStore\\ObjectStoreStorage","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/Storage/Wrapper/Wrapper.php","line":647,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/lib/private/Files/Storage/Wrapper/Wrapper.php","line":647,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/apps/dav/lib/Connector/Sabre/File.php","line":248,"function":"writeStream","class":"OC\\Files\\Storage\\Wrapper\\Wrapper","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/apps/dav/lib/Connector/Sabre/Directory.php","line":151,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/dav/lib/DAV/Server.php","line":1098,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":504,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/apps/dav/appinfo/v1/webdav.php","line":85,"function":"exec","class":"Sabre\\DAV\\Server","type":"->"},{"file":"/vg_DataDbWeb/vol_web/s3nc_2504/remote.php","line":171,"args":["/vg_DataDbWeb/vol_web/s3nc_2504/apps/dav/appinfo/v1/webdav.php"],"function":"require_once"}],"File":"/vg_DataDbWeb/vol_web/s3nc_2504/3rdparty/aws/aws-sdk-php/src/Multipart/AbstractUploadManager.php","Line":134},"message":"Error while uploading to S3 bucket","exception":[],"CustomMessage":"Error while uploading to S3 bucket"},"id":"649bf6b932cd6"}

note* - Uploading is done via webUI

What is the underlying S3 infrastructure implementation? MinIO? Ceph? etc

The BadGateway is the high level error, but the lower level one (from your stack trace) is the real one:

   "Exception": "Aws\\S3\\Exception\\S3MultipartUploadException",
      "Message": "An exception occurred while uploading parts to a multipart upload. The following parts had errors:\n- Part 6: Error executing \"UploadPart\" on \"https://s3fqdn/nextcloud/urn%3Aoid%3A56858?partNumber=6&uploadId=2~LrjTFOEwPrfSrc1vZDAifsOoI3T_3dA\"; AWS HTTP error: cURL error 55: SSL_write() returned SYSCALL, errno = 32 (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://s3fqdn/nextcloud/urn%3Aoid%3A56858?partNumber=6&uploadId=2~LrjTFOEwPrfSrc1vZDAifsOoI3T_3dA  (server): 100 Continue - \n",

This is coming from the official AWS S3 library that NC uses. This error indicates the remote side closed the connection (errno32 = EPIPE / aka: “broken pipe”).

This isn’t a timeout in Nextcloud.

You’re hitting a timeout (or some other type of hard failure that is closing the connection) somewhere along the path beyond Nextcloud. This would be either on your S3 object store or an intermediate part of the path to your S3 object store (like an HTTPS server/proxy, firewall, etc.)

What do the logs on your S3 platform indicate for these transactions?