Desktop client has persistent "Connection Closed" messages

this doesn’t just happen with the desktop client. i’m also unable to add the files directly via the browser. other files work, just the large .pdfs have this issue. is there any workaround?

have also tried adding them to an archive first, but the same issue happens.

+1
I am experiencing the same thing. I’ve added the following. I have a bunch of files that are around 500MB to 800MB. Right now around 30 files.

I’m using Docker, Traefik and Redis

# PHP 7.x
<IfModule mod_php7.c>
  php_value mbstring.func_overload 0
  php_value default_charset 'UTF-8'
  php_value output_buffering 0
  php_value upload_max_filesize 16G
  php_value post_max_size 16G
  php_value max_input_time 3600
  php_value max_execution_time 3600
  <IfModule mod_env.c>
    SetEnv htaccessWorking true
  </IfModule>
</IfModule>

# PHP 8+
<IfModule mod_php.c>
  php_value mbstring.func_overload 0
  php_value default_charset 'UTF-8'
  php_value output_buffering 0
  php_value upload_max_filesize 16G
  php_value post_max_size 16G
  php_value max_input_time 3600
  php_value max_execution_time 3600
  <IfModule mod_env.c>
    SetEnv htaccessWorking true
  </IfModule>
</IfModule>
Also, in the .user.ini
mbstring.func_overload=0
always_populate_raw_post_data=-1
default_charset='UTF-8'
output_buffering=0
php_value upload_max_filesize 16G
php_value post_max_size 16G
php_value max_input_time 3600
php_value max_execution_time 3600

parts of my config.php

  'check_for_working_htaccess' => true,
  'filelocking.enabled' => true,
  'php_upload_limit' => '16G',

FWIW,
I also use Redis …

Thanks

I had the same problem after a new installatioin of NextCloud.
Then I noticed, that small files (less than 10kB) are synchronized, larger ones not - with the notive “Connection closed”.

As a try I changed the max size of a file to be transferred from 10G to 9G … and after that it worked without any problem!

Config → System limits → Max.Filesizt from 10G to 9G
Hope it helps others, too.
Michael

1 Like

In my case, all files, small or large are failing with connection closed on a new computer. The problem was HP Sure sense or Sure click or Sure run that blocked any transfer silently. uninstall of these “tools” solved the issue.

Hi
I am having this problem with one file
where are these settings, client or Nexctcloud instance - I cant find this
Thanks

EDIT: Scratch that - I was looking at the wrong file. The problem in fact was that I had a return character in the filename of the file which seems to be possible in my OS:

Nextcloud Desktop Client

Version 3.6.2 (Arch). For more information please click here.

Using virtual files plugin: suffix

arch-5.15.79-1-lts

Having the exact same issue when syncing a larger file (~500MB) to my self-hosted Nextcloud instance.

I’m running Nextcloud as a Docker image with MariaDB, Nextcloud version is 26.0.1. PHP_MEMORY_LIMIT and PHP_UPLOAD_LIMIT are both set to 2GB. Using the MacOS client version 3.8.2.

Has anybody ever found a solution for this problem?

This fixed it for me: https://github.com/nextcloud/desktop/issues/4278#issuecomment-1099587102

1 Like

I too am getting “connection closed” errors for 2 specific files (10.5 MB and 31.8 MB) on Ubuntu 23.04 Lunar. Rest of the files (including a 281 MB .tgz file) syncs just fine.

Nextcloud client version is 3.10.50. I’m syncing these files with nch.pl.

QNetworkReply :: RemoteHostClosedError "Connection closed" QVariant (Invalid)

The solution mentioned by @TimLisemer and as described in this GitHub issue, is not working for me.

https://github.com/nextcloud/desktop/issues/4278#issuecomment-1099587102

nano $HOME/.config/Nextcloud/nextcloud.cfg

and add:

[General]
chunkSize=10000000
minChunkSize=1000000
maxChunkSize=50000000
targetChunkUploadDuration=6000

In my case the files are well below 50 MB:

1, places.sqlite - 10.5 MB (File comes from Firefox)
2, Bookmarks - 31.8 MB (There’s no file extension. File comes from Vivaldi)

These 2 files resides into a separate Nextcloud directory. In other words, I am NOT syncing these files directly from Firefox or Vivaldi profile directories.

First, I am transferring selected browser data files into a separate Nextcloud directory (within my home directory) and from there they are being synced with nch.pl.

Syncing worked okay for few weeks but around Sep 15, 2023 or so, these Connection closed errors started showing up.

Related log entries:

[ warning nextcloud.sync.networkjob ./src/libsync/abstractnetworkjob.cpp:221 ]:	QNetworkReply::RemoteHostClosedError "Connection closed" QVariant(Invalid)

[ warning nextcloud.sync.credentials.webflow ./src/gui/creds/webflowcredentials.cpp:208 ]:	QNetworkReply::RemoteHostClosedError

[ warning nextcloud.sync.credentials.webflow ./src/gui/creds/webflowcredentials.cpp:209 ]:	"Connection closed"

[ info nextcloud.sync.networkjob.put ./src/libsync/propagateupload.cpp:87 ]:	PUT of "https://nch.pl/remote.php/dav/uploads/<UserName>/<000000000>/00001" FINISHED WITH STATUS "RemoteHostClosedError Connection closed" QVariant(Invalid) QVariant(Invalid)

[ warning nextcloud.sync.propagator ./src/libsync/owncloudpropagator.cpp:284 ]:	Could not complete propagation of "Browser_Profiles/Firefox/places.sqlite" by OCC::PropagateUploadFileNG(0x55c1c36a1e80) with status OCC::SyncFileItem::NormalError and error: "Connection closed"

[ warning nextcloud.gui.activity ./src/gui/tray/usermodel.cpp:878 ]:	Item  "Browser_Profiles/Firefox/places.sqlite"  retrieved resulted in  "Connection closed"

[ warning nextcloud.gui.activity ./src/gui/tray/usermodel.cpp:840 ]:	Item  "Browser_Profiles/Firefox/places.sqlite"  retrieved resulted in error  "Connection closed"


[ warning nextcloud.sync.networkjob ./src/libsync/abstractnetworkjob.cpp:221 ]:	QNetworkReply::RemoteHostClosedError "Connection closed" QVariant(Invalid)

[ warning nextcloud.sync.credentials.webflow ./src/gui/creds/webflowcredentials.cpp:208 ]:	QNetworkReply::RemoteHostClosedError

[ warning nextcloud.sync.credentials.webflow ./src/gui/creds/webflowcredentials.cpp:209 ]:	"Connection closed"

[ info nextcloud.sync.networkjob.put ./src/libsync/propagateupload.cpp:87 ]:	PUT of "https://nch.pl/remote.php/dav/uploads/<UserName>/<000000000>/00001" FINISHED WITH STATUS "RemoteHostClosedError Connection closed" QVariant(Invalid) QVariant(Invalid)

[ warning nextcloud.sync.propagator ./src/libsync/owncloudpropagator.cpp:284 ]:	Could not complete propagation of "Browser_Profiles/Vivaldi/Bookmarks" by OCC::PropagateUploadFileNG(0x55c1c31bbf70) with status OCC::SyncFileItem::NormalError and error: "Connection closed"

[ warning nextcloud.gui.activity ./src/gui/tray/usermodel.cpp:878 ]:	Item  "Browser_Profiles/Vivaldi/Bookmarks"  retrieved resulted in  "Connection closed"

[ warning nextcloud.gui.activity ./src/gui/tray/usermodel.cpp:840 ]:	Item  "Browser_Profiles/Vivaldi/Bookmarks"  retrieved resulted in error  "Connection closed"

Any help is greatly appreciated.

Maybe this helps: Mac desktop app 3.10. files over 10 MB don't upload ❌ connection closed - #6 by roNn23

This topic was automatically closed after 8 hours. New replies are no longer allowed.