WebDAV "request too large", fails on large uploads

Nextcloud version 29.0.5
Operating system and version Ubuntu 24.04
Apache or nginx version Apache/2.4.58 (Ubuntu)
PHP version 8.3
VM on parallels, mac os 13.6.9

The issue you are facing:
Uploading files larger than about 500MB fails when using WebDAV. Tried Finder, Transmit, Cyberduck, Android FX file explorer. Transmit gives the message “request too large”.
Php.ini is adjusted, and reflected in system:

I have exhausted ChatGPT, and cant find the setting where WebDAV file size is limited.

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

Steps to replicate it:

  1. Upload large (eg. 20GB) file using WebDAV
  2. Watch it fail

The output of your Nextcloud log in Admin > Logging:

BadRequest Expected filesize of 21001041268 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 0 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side.

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

  GNU nano 7.2                              /var/www/nextcloud/config/config.php                                        
  'overwrite.cli.url' => 'http://10.hidden',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'hidden',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'default_phone_region' => 'NO',
  'maintenance_window_start' => 1,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' => 'smtp.gmail.com',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_from_address' => 'hidden',
  'mail_domain' => 'gmail.com',
  'mail_smtpname' => 'hidden',
  'mail_smtppassword' => 'hidden',
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\Movie',
    1 => 'OC\\Preview\\PNG',
    2 => 'OC\\Preview\\JPEG',
    3 => 'OC\\Preview\\GIF',
    4 => 'OC\\Preview\\BMP',
    5 => 'OC\\Preview\\XBitmap',
    6 => 'OC\\Preview\\MP3',
    7 => 'OC\\Preview\\MP4',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
    10 => 'OC\\Preview\\PDF',
  ),
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
);


Let me know what other logs or configs are relevant.

LimitRequestBody comes to mind as a possibility: Uploading big files > 512MB — Nextcloud latest Administration Manual latest documentation

Excellent, thank you.

I added LimitRequestBody 0 to /etc/apache2/apache2.conf and can now upload large files.

I believed it wasn’t active since I couldn’t find it anywhere. Did I add it in the correct file? I saw there are some options like: server config, virtual host, directory, .htaccess

1 Like

Yes, that’s a reasonable place to put it in my opinion.

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