desktop
desktop copied to clipboard
"Connection closed" message when syncing files larger then +- 100Mb
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
- Run nextcloud in docker container.
- Use SWAG (docker container) to link (sub)domain to nextcloud
- Upload large file (larger then 100Mb) (in my case a .mp4)
- 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
-
Client logfile: Client_20220213_2039_owncloud.log.0.txt
-
Web server error log: N.A.
-
Server logfile: nextcloud log (data/nextcloud.log): nextcloud.log
(ignore the failed login)
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. https://github.com/nextcloud/desktop/issues/4271
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.
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).
Version 3.3.6 is confirmed to be working. Just tested it out. So something in 3.4.1 broke the chunking.
@allexzander is it possible you could weigh in on this? Thank you for your help
same here
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.
@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?
@nextcloud/desktop Is it possible to check the described error in issue. Users still have a problem with this. Thanks.
I'm on 3.4.1 as well and utilize SSL via CF with Nginx. Running into the same issue as described.
I was experiencing the same issue with 3.4.2.
v3.3.6 working well.
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
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"
Can confirm that 3.4.3 does not work for me, but 3.3.6 does.
Confirmed happening here too
I'm suprised no one has picked this up yet from nextcloud desktop team. No mention of it in the new 3.5.0 RC1
ping @mgallien @camilasan @claucambra
Same issue here with client v3.4.3 on Linux (Manjaro) + cloudflare.
Same here on Android. If in cloudflare I check DNS only - it works, switch back to proxied - dosen't work.
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
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 🤔
that is interesting, if that works for others perhaps we can update the documentation at least.
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=6000Note: 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] sectionin 3.4 🤔
I confirm that this works for Nextcloud 3.4.4 (Windows).
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=6000Note: 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] sectionin 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 :heart:
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.
review/feedback on the above welcome!
The only setting I needed was this:
targetChunkUploadDuration=6000
What surprises me is that according to the docs, this is the default...
targetChunkUploadDuration=6000
I'm confused as to where you would put this setting when running Nextcloud in Docker since the aformentioned .cfg file does not seem to exist.
I was mistaken, I reverted the change to check, and the default is 60000...
2022-04-14 11:09:41:146 [ info nextcloud.sync.propagator.upload.ng C:\Users\sysadmin\AppData\Local\Temp\2\windows-9586\client-building\desktop\src\libsync\propagateuploadng.cpp:418 ]: Chunked upload of 10000000 bytes took 2552 ms, desired is 60000 ms, expected good chunk size is 235109717 bytes and nudged next chunk size to 122554858 bytes
targetChunkUploadDuration=6000
I'm confused as to where you would put this setting when running Nextcloud in Docker since the aformentioned .cfg file does not seem to exist.
It took me a while to figure that out too, it goes on the client, not the server. I don't know if it's already possible, but it would be nice to set the preferred chunking settings on the server-side, so it propagates to all clients.