File upload to Filedrop hangs at 0 or fails when filesize over 100mb

Details
Nextcloud version: 27.1.3
Operating system and version: Ubuntu 22.04.3 LTS (GNU/Linux 5.15.0-88-generic x86_64)
Apache or nginx version: Apache 2.4
PHP version: 8.1
32GB RAM
8 KVM Cores - Intel(R) Xeon(R) Silver 4214 CPU @ 2.20GHz
600GB NVME

Apps Enabled
Circles
Collaborative tags
Comments
Contacts
Contacts Interaction
Dashboard
Federation
File reminders
File sharing
First run wizard
Log Reader
Monitoring
Nextcloud Office
Notifications
Password policy
PDF viewer
Photos
Privacy
Related Resources
Right click
Share by mail
Support
Text
Update notification
Usage survey
Versions
Weather status

Issue:
Creating a Filedrop sharelink and trying to upload a file over 100mb to it fails to upload. (99mb works fine, any file over 100mb hangs at 0, sometimes it eventually fails.) I’m aware that filedrop doesn’t support chunking yet, but I have set my upload_max_filesize, post_max_size and memory_limit to 16G (tried 8G too), the upload fail still stays at 100mb. I can’t find anything else that is limiting it.

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

Steps to replicate it:

  1. Create a folder and share it as Filedrop (and Hide Download ticked, not sure if that is relevant)
  2. Go to the share link and upload a file larger than 100mb.

The output of your Nextcloud log in Admin > Logging:

No logs generated on upload/fail in Logging.

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

<?php
$CONFIG = array (
  'instanceid' => 'REMOVED',
  'passwordsalt' => 'REMOVED',
  'secret' => 'REMOVED',
  'trusted_domains' =>
  array (
    0 => 'cloud.snows.dev',
    1 => 'cloud.raiko.dev',
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'dbtype' => 'mysql',
  'version' => '27.1.3.2',
  'overwrite.cli.url' => 'http://cloud.snows.dev',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => 'REMOVED',
  'installed' => true,
  'htaccess.IgnoreFrontController' => false,
  'htaccess.RewriteBase' => '/',
  'overwriteprotocol' => 'https',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'simpleSignUpLink.shown' => false,
  'loglevel' => 2,
  'debug' => false,
  'filelocking.enabled' => true,
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'localhost',
    'port' => 6379,
    'timeout' => 0.0,
    'password' => '',
  ),
  'maintenance' => false,
);

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

No logs generated on upload/fail.

Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.

No logs generated when upload starts/fails

Do you use end-to-end encryption in this folder, or anywhere?

No, I do not use any type of encryption. I looked into browser network logs and it seems that when the upload fails, I get a 413 Payload Too Large on a PUT request to https://[domain]/public.php/webdav/[filename]

I believe the error I included does not have to do with why it fails.
(Tested again, did not generate any logs, edited original post and removed to reflect this)

https://docs.nextcloud.com/server/stable/admin_manual/configuration_files/big_file_upload_configuration.html#apache

Other references were found with mod_security module in apache:

You can change the loglevel to get more information out of your webserver:
https://httpd.apache.org/docs/2.4/en/mod/core.html#loglevel

I do not have mod_security. I although tried adding the implicit LimitRequestBody 0 on all instances of .htaccess from find / -name .htaccess
This did not fix the issue, any files above 100mb still fail/hang despite PHP allowing those sized uploads. (Yes I restarted the apache server)
I’ve also enabled all logs, debug did nothing so I did trace8, which I believe still doesn’t give any relevant info but I’m not exactly sure. (I redacted all access tokens and instances of my IP)

What I’m wondering about is your access.log, when I upload a large file, it looks like that:


1.2.3.4 - - [28/Nov/2023:14:36:40 +0100] nextcloud.example.org "MKCOL /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:36:40 +0100] nextcloud.example.org "GET /apps/files/api/v1/stats HTTP/2.0" 200 155 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:36:44 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/1 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:36:49 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/2 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:36:53 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/3 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:36:57 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/4 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:02 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/5 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:06 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/6 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:11 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/7 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:15 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/8 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:19 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/9 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:24 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/10 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:28 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/11 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:32 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/12 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:37 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/13 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:41 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/14 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:46 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/15 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:50 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/16 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:54 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/17 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:37:59 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/18 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:38:03 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/19 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:38:07 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/20 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:38:12 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/21 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:38:15 +0100] nextcloud.example.org "PUT /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/22 HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:38:15 +0100] nextcloud.example.org "GET /apps/files/api/v1/stats?dir=%2Ftest HTTP/2.0" 200 148 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:38:17 +0100] nextcloud.example.org "MOVE /remote.php/dav/uploads/username/web-file-upload-4247fb4a883243f54c48947477905cc9-1701178600063/.file HTTP/2.0" 201 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:38:17 +0100] nextcloud.example.org "GET /apps/files/api/v1/stats HTTP/2.0" 200 155 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"
1.2.3.4 - - [28/Nov/2023:14:38:17 +0100] nextcloud.example.org "PROPFIND /remote.php/dav/files/username/test/file.name HTTP/2.0" 207 604 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/119.0" "-"

You don’t have some modules activated that are known to cause problems:
https://docs.nextcloud.com/server/latest/admin_manual/issues/general_troubleshooting.html#web-server-and-php-modules

Or a reverse proxy filtering stuff?

For nginx i found this thread. Can you post your detailed configuration for apache2 and php? Is the config really used e.g. virtual webserver …

I was using just the straight out-the-box setup for nextcloud with only changes to the theme, and database/cache support (as seen in the config.php).

I’m not sure what a reverse proxy filter is so probably not? I have my IP linked to the domain on cloudflare, I’ve tried with both proxy on and off.

Keep in mind I am uploading as a guest using Filedrop in a shared folder.

php.ini - Pastebin.com
apache2.conf - Pastebin.com
raiko.dev.conf (sites-available) - Pastebin.com

No configuration in php/apache limit single file uploads to 100mb tho, I would assume it’s something to do with the webdav server.

This is the culprit. The free/lower tiers of Cloudflare service limit the HTTP body size to 100 MB.

This isn’t an issue for Nextcloud when you’re logged in since all the clients use chunking for uploads (unless you disable it for some reason). Chunking splits up larger uploads in multiple transactions in order to fit through the various limits along the web path.

But public (unauthenticated) uploads do not currently support chunking in Nextcloud. So if you use public uploads with a pathway that has a limit (and there’s always some limit… though not usually as low as 100MB), you’ll be restricted to whatever the lowest limit is along the pathway. In this case, Cloudlfare is the the lowest.

That may change now that the Files2Vue migration is well underway, but someone inclined enough will have to pick up the task of implementing chunking for public uploads.

Your main option at the moment, at least for public uploads, is to disable Cloudflare. Or, possibly, to implement something like guest accounts with something like the guests app.

Thanks for pointing out the issue! Although I’m not sure how to “disable Cloudflare”, disabling proxy on Cloudflare (DNS Only) seems to just make the site inaccessible. (Tried waiting a few hours but it didn’t change)
image

With host filedrop.raiko.dev or nslookup filedrop.raiko.dev (windows), you can check if the DNS resolves for your IP.

I tested that the IP is linked correctly on Cloudflare with the host command, although the connection is still refused. For some reason the site only works if I turn on Proxy for the DNS on Cloudflare, but that would limit the post size.

I tested with firewall off, and on with 443 & 80 enabled, and with multiple browsers, with no avail.

In this case, it is perhaps better to open a new topic. Could be something in your network settings and not really connected to your initial issue.

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