Skip to content
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

"Connection closed" message when syncing files larger then +- 100Mb #4278

Open
Jhutjens92 opened this issue Feb 13, 2022 · 162 comments
Open

"Connection closed" message when syncing files larger then +- 100Mb #4278

Jhutjens92 opened this issue Feb 13, 2022 · 162 comments

Comments

@Jhutjens92
Copy link

I have my nextcloud installation running in a docker container. It's connected to a MySQL DB (another docker container) and exposed to the web using SWAG. All the relevant php.ini/config files have the following settings

  • client_max_body_size set 0
  • upload_max_filesize 16G
  • post_max_size 16G
  • max_input_time 3600
  • max_execution_time 3600

Uploading via webserver is no problem but whenever i try to sync the same file using the windows sync client i receive a "Connection Closed"

Expected behaviour

Files should just upload to the nextcloud server.

Actual behaviour

Files aren't being uploaded and client throws an error:

Steps to reproduce

  1. Run nextcloud in docker container.
  2. Use SWAG (docker container) to link (sub)domain to nextcloud
  3. Upload large file (larger then 100Mb) (in my case a .mp4)
  4. See response in client log.

Client configuration

Client version: 3.4.2

Operating system: Microsoft Windows 10 Pro (10.0.19041 Build 19041)

OS language: Dutch

Installation path of client: C:\Program Files\Nextcloud

Nextcloud version: Nextcloud Hub II (23.0.0)

Storage backend: Local server storage

Logs

  1. Client logfile:
    Client_20220213_2039_owncloud.log.0.txt

  2. Web server error log:
    N.A.

  3. Server logfile: nextcloud log (data/nextcloud.log):
    nextcloud.log

(ignore the failed login)

@Jhutjens92 Jhutjens92 added the bug label Feb 13, 2022
@metheis
Copy link

metheis commented Feb 13, 2022

are you using Cloudflare in your setup? I'm running into the same issue because of Cloudflare's 100 MB upload limit and the client not seeming to chunk.
#4271

@Jhutjens92
Copy link
Author

Jhutjens92 commented Feb 13, 2022

are you using Cloudflare in your setup? I'm running into the same issue because of Cloudflare's 100 MB upload limit and the client not seeming to chunk. #4271

I am using cloudflare for SSL on SWAG with my domain. I didn't even stop to think about it. Did you figure out a way around it/fix? Nextcloud is chunking the file (correct me if I'm wrong) so something is not working as intented. I could turn off cloudflare for my subdomain but that would defeat the purpose of using it in the first place.

@metheis
Copy link

metheis commented Feb 13, 2022

Right, agreed, I prefer to keep Cloudflare on. What I found works is if I uninstall the client (I had version 3.4.1) and reinstall version 3.3.6 from October, the issue goes away. I think the issue must be with how the newer client chunks (or lack there of).

@Jhutjens92
Copy link
Author

Jhutjens92 commented Feb 14, 2022

Version 3.3.6 is confirmed to be working. Just tested it out. So something in 3.4.1 broke the chunking.

@metheis
Copy link

metheis commented Feb 14, 2022

@allexzander is it possible you could weigh in on this? Thank you for your help

@xt0x1c

This comment was marked as duplicate.

@tusharraval102
Copy link

I can confirm that I have the same issue. I recently upgraded to 3.4.2 and my client app would not sync files larger than 100mb. I just downgraded to 3.3.6 and it works without any issues. I am using CloudFlare, MacOS Monterey, and the latest NextCloud server.

@metheis
Copy link

metheis commented Feb 16, 2022

@Valdnet or @er-vin it seems like a number of users are running into this issue starting with 3.4.1 (and still present in 3.4.2). Any thoughts on what change lead to this?

@Valdnet

This comment was marked as duplicate.

@ThatTallGuy21
Copy link

I'm on 3.4.1 as well and utilize SSL via CF with Nginx. Running into the same issue as described.

@Vixavius
Copy link

I was experiencing the same issue with 3.4.2.

v3.3.6 working well.

@ghost
Copy link

ghost commented Feb 24, 2022

This is happening to me, I am using cloudflare and the 100MB limit doesn't affect my upload but the client is bringing up errors when uploading files, i'm trying 3.3.6 now to see if this is just a bug

@ghost
Copy link

ghost commented Feb 26, 2022

Yep I can confirm on my side aswell version 3.3.6 works fine then latest client broke chunking and possibly keep alive "closing connection"

@mitohund
Copy link

Can confirm that 3.4.3 does not work for me, but 3.3.6 does.

@Rami-Pastrami

This comment was marked as duplicate.

@Jhutjens92

This comment was marked as duplicate.

@Valdnet

This comment was marked as spam.

@Kn-ut99
Copy link

Kn-ut99 commented Mar 31, 2022

Same issue here with client v3.4.3 on Linux (Manjaro) + cloudflare.

@relains
Copy link

relains commented Apr 2, 2022

Same here on Android. If in cloudflare I check DNS only - it works, switch back to proxied - dosen't work.

@WasabiCarpet
Copy link

WasabiCarpet commented Apr 11, 2022

Dropping a comment here to say I'm experiencing the same issue as above and am also using cloudflare.

Edit: I'll add that reverting to 3.3.6 also fixed the issue for me and all my large files upload just fine now

@PaperMemo
Copy link

I randomly put this thing into nextcloud.cfg (in [General] section) and somehow it works for me. (I don't know if it works for other people or not)

chunkSize=10000000
minChunkSize=1000000
maxChunkSize=50000000
targetChunkUploadDuration=6000

Note: I use version 3.4.3 on Manjaro Linux
Note 2: I read from https://docs.nextcloud.com/desktop/3.0/advancedusage.html because, in the documentation, I didn't see [General] section in 3.4 🤔

@jospoortvliet
Copy link
Member

that is interesting, if that works for others perhaps we can update the documentation at least.

@weeix
Copy link

weeix commented Apr 14, 2022

I randomly put this thing into nextcloud.cfg (in [General] section) and somehow it works for me. (I don't know if it works for other people or not)

chunkSize=10000000
minChunkSize=1000000
maxChunkSize=50000000
targetChunkUploadDuration=6000

Note: I use version 3.4.3 on Manjaro Linux Note 2: I read from https://docs.nextcloud.com/desktop/3.0/advancedusage.html because, in the documentation, I didn't see [General] section in 3.4 🤔

I confirm that this works for Nextcloud 3.4.4 (Windows).

@Kn-ut99
Copy link

Kn-ut99 commented Apr 14, 2022

I randomly put this thing into nextcloud.cfg (in [General] section) and somehow it works for me. (I don't know if it works for other people or not)

chunkSize=10000000
minChunkSize=1000000
maxChunkSize=50000000
targetChunkUploadDuration=6000

Note: I use version 3.4.3 on Manjaro Linux Note 2: I read from https://docs.nextcloud.com/desktop/3.0/advancedusage.html because, in the documentation, I didn't see [General] section in 3.4 thinking

I too can confirm that this solved the issue (Nextcloud client 3.4.3, Manjaro).
Only setting "chunkSize" does not work, I had to set all 4 settings in the config file. I don't really understand why, but hey, it works.
Thank you ❤️

@Gwindalmir
Copy link

Gwindalmir commented Apr 14, 2022

I can confirm this fixes it on Nextcloud 4.4.4 on Windows 10.

The only setting I needed was this:
targetChunkUploadDuration=6000

That matches what I noticed empirically, which was that the syncing failed and restarted about every 6 seconds.

Iirc from the log, the default was like 20 or 28 seconds.

@jospoortvliet jospoortvliet mentioned this issue Apr 14, 2022
3 tasks
@jospoortvliet
Copy link
Member

review/feedback on the above welcome!

@jospoortvliet
Copy link
Member

The only setting I needed was this:
targetChunkUploadDuration=6000

What surprises me is that according to the docs, this is the default...

@fracture-point
Copy link

Adding my 2c that (1) I am also affected on an out of the box install behind Cloudflare, (2) the workaround works, and (3) this was a major reason why I moved off of owncloud - the mobile app did not chunk properly which made syncing behind CF unusable.

@codefaux

This comment was marked as off-topic.

@fracture-point
Copy link

@codefaux can you link me to the section of the ToS that you believe restricts using Nextcloud behind it? Are you talking about using a CF tunnel or just the cloud proxy? I do not use Cloudflare tunnels; I only use the traditional cloud proxy.

They used to have a restriction on non-HTML traffic, but that section was updated and removed. They discuss limitations on assets hosted on the CDN, but CF does not cache any assets stored in NC, just elements of the frontend. There is also a Reddit that discusses this with the same conclusion.

@sorvani
Copy link

sorvani commented Jul 10, 2024

I do not use Cloudflare with my Nextcloud server and I also have this problem, I stated that previously. Today, I have a new Windows laptop I jsut setup and installed the current agent and still have this problem. I guess Nextcloud wants me to switch to OneDrive, Google Drive, or even back to OwnCloud?

@devotoare
Copy link

I ran into this error with an Unraid Docker container. The issue ended up being the nginx config had client_max_body_size set to 512M in a secondary config file that got created a few updates back from the LinuxServer.io folks. Whereas when I initially created the container there was only one config file.

@Soulplayer
Copy link

This is a really annoying issue. I have to explain to all of my users how to edit the config files. I hope this gets fixed!

@artforlife
Copy link

This is a really annoying issue. I have to explain to all of my users how to edit the config files. I hope this gets fixed!

Could you explain how to edit the configs and get it working?

@Soulplayer
Copy link

This is a really annoying issue. I have to explain to all of my users how to edit the config files. I hope this gets fixed!

Could you explain how to edit the configs and get it working?

#4278 (comment) > follow this and it works.

@AdamAnon
Copy link

I randomly put this thing into nextcloud.cfg (in [General] section) and somehow it works for me. (I don't know if it works for other people or not)

chunkSize=10000000
minChunkSize=1000000
maxChunkSize=50000000
targetChunkUploadDuration=6000

Note: I use version 3.4.3 on Manjaro Linux Note 2: I read from https://docs.nextcloud.com/desktop/3.0/advancedusage.html because, in the documentation, I didn't see [General] section in 3.4 🤔

Wow.... it's 2024, client version 3.14.3 on Windows 11, no Cloudflare or anything fancy and out of the blue I started getting these "connection closed" errors and this fixed it for me on all my machines. Thank you!!!!

What the hell though??? I've been uploading files in tens of gigabytes in size for years with appropriate php tweaks on the server side and I never had to do make any changes to the client.

Probably related to client upgrade, though I even downgraded all my clients to 3.13.0 and that didn't help. Is Nextcloud software tested before release or you just release it and hope for the best????

@codefaux
Copy link

codefaux commented Dec 3, 2024

@everyone currently waiting for this to be fixed, they just closed the PR #4826 which fixed the issue but was not implemented due to their unit tests being broken. The pull was closed due to @Rello "as it is outdated, no longer relevant (e.g., due to Qt 6), or does not align with the current roadmap."

It's outdated because everyone ignored the broken tests and pretended it didn't exist. It's relevant due to the bug still existing for clients as of weeks ago. The current roadmap should include the client working for everyone so I'm not sure about that load either.

I'm not even still using this mess and I'm upset, I can't imagine how actual users feel.

@AdamAnon
Copy link

AdamAnon commented Dec 3, 2024

I'm getting closer to abandoning Nextcloud for good after around three years of nearly constant struggle with both the client and the server. I have a simple, single user installation with only a handful of apps, just for file synchronization, nothing advanced.

I just updated the Windows clients to 3.15.0 and I'm getting the bug again where permissions are changed to Deny=All on the Nextcloud Windows user directory. I also tested the server v.30.0.3, clean install on fresh Debian, and I get errors that I'd normally get after updating the server in the last few years. I really think their software isn't tested properly if at all.

@Rello
Copy link
Contributor

Rello commented Dec 3, 2024

@codefaux
Hello,
thank you for reporting this. We will check if there is a misunderstanding here.
I will get back to you...

@codefaux
Copy link

codefaux commented Dec 3, 2024

I'm getting closer to abandoning Nextcloud for good after around three years of nearly constant struggle with both the client and the server. I have a simple, single user installation with only a handful of apps, just for file synchronization, nothing advanced.

I just updated the Windows clients to 3.15.0 and I'm getting the bug again where permissions are changed to Deny=All on the Nextcloud Windows user directory. I also tested the server v.30.0.3, clean install on fresh Debian, and I get errors that I'd normally get after updating the server in the last few years. I really think their software isn't tested properly if at all.

@AdamAnon -- Well, unless lots of people thumbs up your issue, they don't give it any priority, according to what I was told by a developer above. This gives the impression that they ignore severity unless lots of people click the emoji, which absolutely baffles me.

This issue has over 80 participants, well over a hundred messages, repeated reports of the same error, was started in Feb 2022, has consistent attention, lots of very angry users, AND A RELATED PR REPORTED AND AGREED TO FIX THE ISSUE.

Anyone who sees this, sees

"INEPT"

I can't see around this. It takes up my entire sightline when I look at NextCloud, and I am eternally biased against it; despite NextCloud being the only client I'm aware of to include the one feature I want most, I will never use it again.

I cannot be alone here, and it is ridiculous for a group of developers claiming passion and care regarding their project to ignore how this feels to users.

@Rello
Copy link
Contributor

Rello commented Dec 4, 2024

@codefaux

please see the explanation which was posted to the pull request you referenced. There is a technical reason to do this in a better way and it will be implemented in the future

Hello,

please let me explain the reason, which was not documented in the closing properly.

The feature is not isolated to one desktop client. It affects all clients: Linux, Windows, macOS, macOS VFS, Android, iOS
Every client has some different implementation so we are aligning all them by providing a proper integration via server capabilities, that will be used by all clients in the same way.

The server implementation was performed here: 
https://github.com/nextcloud/server/issues/47682

The corresponding desktop implementation will be tracked here
https://github.com/nextcloud/desktop/issues/7347

I hope this clears the confusion and I excuse myself for not putting this in the original closing post

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet