-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chunked transfers lead to 0 byte files #7995
Comments
After some more testing I've noticed that it's even worse. It does not matter if you create a 0 byte file prior updating it. Basically all
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
I too am having this issue with webdav. I noticed this behavior when trying to export my Kodi library via webdav to nextcloud. I can also provide a sanitized HTTP communication if needed, but I guess that will not help much. |
I just tested on nextcloud 15 with a 700 kb image. 256 kb of the image made it to the server. a 7.5 mb ODP file was also cut in half - 3.3 mb on the server.
|
This comment was marked as resolved.
This comment was marked as resolved.
This seems to actually be a bug in mod_fcgid used by FPM. It was fixed in version 2.3.10, but version 2.3.9 is still the only one proposed by Debian. I contacted the Debian maintainer and offered him a bounty to see if the new version could be uploaded to Debian. In the meantime, NextCloud could implement an error message if this bug is detected, see this example:
For sysadmins, the only solution is to either compile your own mod_fcgid or to use mod_php instead. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as resolved.
This comment was marked as resolved.
This is not a patch, but an idea, I'll let you implement it in NextCloud. |
I fear I am not the right guy to implement this. However I suppose it would need to get added somewhere here: server/apps/dav/lib/Connector/Sabre/File.php Line 588 in 9e73412
cc @nextcloud/server-backend |
Problem occurs here too. Nextcloud 27.0.2, nginx/1.18.0 (Ubuntu) over FastCGI, PHP 8.1 (8.1.22-1+ubuntu22.04.1+deb.sury.org+1) DAVx⁵ unfortunately has to use chunked transfer because it get its input data as stream, so the problem always occurs with DAVx⁵ (but also with curl when using chunked transfer). |
Got the same problem with apache 2.4.57, mpm_event, mod_proxy_fcgi and php8.2-fpm on Debian 12. Temporary? solved by adding |
We use the same solution in the Nextcloud VM: https://github.com/nextcloud/vm/blob/master/lets-encrypt/activate-tls.sh#L124-L129 |
How can this still be a thing after 7 (!?!) years? Ran into 0 byte video files when using chunked upload with PhotoSync app. |
It seems to me everyone is busy developing new features. There are other issues like this ("Reliable Up/Download" #11138 for example) where I'm stumped that they were not found, fixed, tested and regression-tested since v1. I really hope the team is going to reverse course some day and develop a solid file-syncing solution. |
We hit the annoying 0 byte files issue when using a
PUT
operation with a chunked transfer encoding to modify an existing 0 byte file. After successfully executing thePUT
the server replies with a 204 but the file is still empty. Not sure if this is a NC or sabre/dav issue.I'm using nginx 1.13.8 as a webserver (nginx 1.10.3 doesn't work either). My nginx configuration is quite default. The relevant part:
Some observations:
fastcgi_request_buffering off
tofastcgi_request_buffering on
solves the issue but this is not an option for large streamed files.Background: I'm a developer of Mountain Duck which uses the create/update file pattern described here http://sabre.io/dav/0bytes/. According this document nginx in a newer version should work fine. We have several users hitting this issue though.
Steps to reproduce
Expected behaviour
Files has updated content and correct size
Actual behaviour
Remote file is not touched at all and you still see 0 bytes
Server configuration
Operating system:
Ubuntu 16
Web server:
nginx
Database:
MariaDB
PHP version:
7.0.22
Nextcloud version: (see Nextcloud admin page)
12.0.4
Updated from an older Nextcloud/ownCloud or fresh install:
Fresh
Where did you install Nextcloud from:
Official download
The text was updated successfully, but these errors were encountered: