Nextcloud only uploads files <15kB

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, 18.0.2): 20.0.2
Operating system and version (eg, Ubuntu 20.04): Linux 5.4.72-v7l+ armv7l
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1): 7.3.19

The issue you are facing:

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

Steps to replicate it:

  1. Because I had problems syncing with the Desktop Client I switched off E2E-Encryption.
  2. Now the Upload of any files does not work on any client, if the file is bigger than 15kB. Downloading the existing files still works.
  3. Switching E2E-Encryption on again did not work.

The output of your Nextcloud log in Admin > Logging:

[no app in context] Error: Sabre\DAV\Exception\BadRequest: Expected filesize of 1700471 bytes but read (from Nextcloud client) and wrote (to Nextcloud storage) 8192 bytes. Could either be a network problem on the sending side or a problem writing to the storage on the server side. at <<closure>>

 0. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 155
    OCA\DAV\Connector\Sabre\File->put(null)
 1. /var/www/nextcloud/apps/dav/lib/Upload/UploadFolder.php line 46
    OCA\DAV\Connector\Sabre\Directory->createFile("0000000000000000-0000000001700471", null)
 2. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1104
    OCA\DAV\Upload\UploadFolder->createFile("0000000000000000-0000000001700471", null)
 3. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 527
    Sabre\DAV\Server->createFile("uploads/ncp/6b5 ... 1", null, null)
 4. /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPut(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
 5. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 474
    Sabre\DAV\Server->emit("method:PUT", [Sabre\HTTP\Requ ... }])
 6. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 251
    Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
 7. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 319
    Sabre\DAV\Server->start()
 8. /var/www/nextcloud/apps/dav/lib/Server.php line 332
    Sabre\DAV\Server->exec()
 9. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
10. /var/www/nextcloud/remote.php line 167
    require_once("/var/www/nextcl ... p")

PUT /remote.php/dav/uploads/ncp/6b54467124445e3650190937a89125db/0000000000000000-0000000001700471
from 195.37.6.6 by ncp at 2020-12-03T09:16:04+00:00

[PHP] Error: Error: Cannot modify header information - headers already sent by (output started at /var/www/nextcloud/3rdparty/sabre/http/lib/Sapi.php:132) at /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php#691 at <<closure>>

0. <<closure>>
   OC\Log\ErrorHandler::onError(2, "Cannot modify h ... )", "/var/www/nextcl ... p", 691, {string: "X-Hash ... "})
1. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 691
   header("X-Hash-SHA256:  ... 7")
2. /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 195
   OCA\DAV\Connector\Sabre\File->header("X-Hash-SHA256:  ... 7")
3. <<closure>>
   OCA\DAV\Connector\Sabre\File->OCA\DAV\Connector\Sabre\{closure}("*** sensitive parameters replaced ***")
4. /var/www/nextcloud/lib/private/Files/Stream/HashWrapper.php line 71
   call_user_func(Closure {}, "*** sensitive parameter replaced ***")
5. /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 319
   OC\Files\Stream\HashWrapper->stream_close()
6. /var/www/nextcloud/apps/dav/lib/Server.php line 332
   Sabre\DAV\Server->exec()
7. /var/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
   OCA\DAV\Server->exec()
8. /var/www/nextcloud/remote.php line 167
   require_once("/var/www/nextcl ... p")

PUT /remote.php/dav/uploads/ncp/6b54467124445e3650190937a89125db/0000000000000000-0000000001700471
from 195.37.6.6 by ncp at 2020-12-03T09:16:04+00:00

The old topic originates before Nextcloud split from ownCloud, therefore the guideline from early after the split should still be valid: