Weird performance issue on one client and not the other

Nextcloud version (eg, 20.0.5): 25.0.2
Operating system and version (eg, Ubuntu 20.04): TrueNAS SCALE
PHP version (eg, 7.4): 8.1.13
Client: 3.8.2(windows)

This is going to be a bit of a ramble and I am posting here as I am out of my wits.

I have 2 client, my desktop and my laptop and I run nextcloud on my TrueNAS SCALE instance running on a server which is well speced with a 4 core (8 thread) processor and 32 GB of RAM. I have been using the setup for nearly a year now and I am pretty happy with it.I will generally work on my desktop, wait for the sync to complete before shutting down and then start up my laptop, wait for the sync to finish before starting work, and I generally have to wait a couple of minutes max for the sync to be completed.

From today, I am having huge issues with syncing in my desktop. Its taking over an hour for the sync to complete, something which used to take 2-5 minutes max on a bad day. When I try to sync on my laptop, it still syncs in under 2 minutes. Hence, I feel like something is wrong with the desktop client only, or something is corrupted.

I have managed to get all my folder connections to show GREEN after waiting a lot patiently but they soon went back into the sync loop and again it was stuck for an hour.

I don’t know if it could be related but I accidentally added a folder with thousands of files into a synced folder. I stopped the sync, deleted the folder in the server and added that folder in my ignores before restarting (which works, my laptop didn’t get those files) but I wonder if I screwed some local cache or something.

Any idea if there is something wrong with my nextcloud client? Can I clean the client cache or something?

EDIT: Found some additional logs in the Windows client. Here’s the logs for the folder that’s taking a lot of time to sync.

#=#=#=# Syncrun started 2023-05-28T18:50:40Z
#=#=#=#=# Propagation starts 2023-05-28T19:08:23Z (last step: 1063202 msec, total: 1063202 msec)
19:08:25||databases/.idea/dataSources/5cd40c79-0030-4bae-a670-73d3e6034623.xml|64|1|1685298250|0d3ebe72fde7e94d1ae79b8c2cc03de7|798301|00078779oc4q5le55v8o|12||204|798301|1681203019|f6427202-49d5-41dc-900c-f2b5cee0d3e6|
19:08:32||databases/.idea/dataSources/461484cb-2bad-4057-8c97-6de2763a9d92.xml|64|1|1685298276|c4bdbcdf5e80e494693297f704bd37c5|4297743|00078782oc4q5le55v8o|12||204|4297743|1681203070|0616d7ec-357d-4570-a33b-443b55db96b0|
19:08:33||databases/.idea/dataSources/6754fe2f-998e-4665-b3d7-27b3fbeaa1d7.xml|8|1|1685298651|cd4fe7e81dfdf011d43907d360388821|62314|01171208oc4q5le55v8o|12||201|0|0|28098b6c-5fc5-456e-a51c-a7d6812815c3|
19:08:36||databases/.idea/dataSources/7fda3be4-8c96-4edb-9d6f-773142ea4717.xml|64|1|1685298243|78445758ef23e801eb59e756f9c36b5e|207217|00078784oc4q5le55v8o|12||204|207217|1681203009|8271a233-7879-4362-94a6-b553925b8f53|
19:08:37||databases/.idea/dataSources/615eb3b7-5313-41cc-968f-8e72aa965fda.xml|64|1|1685298508|220c31e6f0a82c47f64b7e3314c4f18b|17538213|00078787oc4q5le55v8o|12||204|17552863|1681190776|e6788b8b-6851-4211-9d97-eabd35172bfa|
19:08:40||databases/.idea/dataSources/b6d9a0f3-4db5-4b22-a0ce-bf08e8e6e3e4.xml|64|1|1685298243|60f02f09e00bdfb6d505005dcd40d2fc|1197677|00078791oc4q5le55v8o|12||204|1197677|1681203007|4fba1938-3ebd-4c93-a9b1-a2f2cf69b9ef|
19:08:40||databases/.idea/dataSources/6504623a-0d39-493e-873f-db4ba58cbef1.xml|64|1|1685298617|e9032aaf8904778eaafcb9574c647979|17548194|00078804oc4q5le55v8o|12||204|17548194|1681203573|58a98a68-1a07-40dc-9e98-300df8323de4|
19:08:41||databases/.idea/dataSources/c2c8f4be-8e40-44ba-8506-ad5a87210a4d.xml|64|1|1685298390|c7d3f4ebb5388b6d5a10550911ec6bfe|87696|00078796oc4q5le55v8o|12||204|87696|1681203292|b045bc15-b5d2-473b-af32-8664976fe49a|
19:08:41||databases/.idea/dataSources/df6cdc8f-02fc-40c1-b6b4-9e8b4b099621.xml|64|1|1685298236|0af23b6d304c0767ed620be5f758507f|129682|00078798oc4q5le55v8o|12||204|129682|1681202986|68082135-15ae-44a4-b99c-18748c998ec2|
19:08:41||databases/.idea/dataSources.local.xml|64|1|1685299796|0f94e4f73c873bdf644e57155011f1b5|14047|00077838oc4q5le55v8o|12||204|14048|1681049715|9cc7b463-bfaf-4ae7-b568-760af2954b15|
19:08:42||databases/.idea/dataSources.xml|64|1|1685299796|909cdf38ca85df245fea090a0cc1cdf7|5457|00077841oc4q5le55v8o|12||204|5457|1666168926|d93c078f-6b9a-440b-8a22-ad2be3f00295|
19:08:42||databases/.idea/workspace.xml|64|1|1685298262|7a6bd15edbfc370fd182e243f5cee4f9|2384|00078802oc4q5le55v8o|12||204|2516|1681196946|da15e139-9e4f-42de-9864-ca72bcf55c30|
19:08:44||databases/.idea/dataSources/922df5b9-4496-4de8-99c9-74de5ad18c7a.xml|64|1|1685298390|54147a7788dea120ac2cf0c214ead103|17514003|00078795oc4q5le55v8o|12||204|17514003|1681203292|b15ca06e-4cfb-48f3-ac8a-5566ce635a5d|
#=#=#=# Syncrun finished 2023-05-28T19:08:47Z (last step: 24137 msec, total: 1087340 msec)

As you can see, the propagation is starting after almost 20 mins of the sync run event. This is happening only for some large folders in my desktop. For another smaller folder, the propagation is starting within a few seconds of the sync run and on my laptop, all folders are behaving in a similar way.

doing so you likely you did brake client local DB.

Without any confidence you could return back to normal if you

  1. stop the client
  2. remove 3 files in your Nextcloud directory
    • .sync_{random value}.db-shm
    • .sync_{random value}.db
    • .sync_{random value}.db-wal
  3. restart the client and wait until (full) sync completes

the other and likely longer way will be to remove your account from the client and sync all the contents fresh from the cloud to desktop.

I made the following edit to the question right as you were posting. Maybe it will give you some more context.

Found some additional logs in the Windows client. Here’s the logs for the folder that’s taking a lot of time to sync.

#=#=#=# Syncrun started 2023-05-28T18:50:40Z
#=#=#=#=# Propagation starts 2023-05-28T19:08:23Z (last step: 1063202 msec, total: 1063202 msec)
19:08:25||databases/.idea/dataSources/5cd40c79-0030-4bae-a670-73d3e6034623.xml|64|1|1685298250|0d3ebe72fde7e94d1ae79b8c2cc03de7|798301|00078779oc4q5le55v8o|12||204|798301|1681203019|f6427202-49d5-41dc-900c-f2b5cee0d3e6|
19:08:32||databases/.idea/dataSources/461484cb-2bad-4057-8c97-6de2763a9d92.xml|64|1|1685298276|c4bdbcdf5e80e494693297f704bd37c5|4297743|00078782oc4q5le55v8o|12||204|4297743|1681203070|0616d7ec-357d-4570-a33b-443b55db96b0|
19:08:33||databases/.idea/dataSources/6754fe2f-998e-4665-b3d7-27b3fbeaa1d7.xml|8|1|1685298651|cd4fe7e81dfdf011d43907d360388821|62314|01171208oc4q5le55v8o|12||201|0|0|28098b6c-5fc5-456e-a51c-a7d6812815c3|
19:08:36||databases/.idea/dataSources/7fda3be4-8c96-4edb-9d6f-773142ea4717.xml|64|1|1685298243|78445758ef23e801eb59e756f9c36b5e|207217|00078784oc4q5le55v8o|12||204|207217|1681203009|8271a233-7879-4362-94a6-b553925b8f53|
19:08:37||databases/.idea/dataSources/615eb3b7-5313-41cc-968f-8e72aa965fda.xml|64|1|1685298508|220c31e6f0a82c47f64b7e3314c4f18b|17538213|00078787oc4q5le55v8o|12||204|17552863|1681190776|e6788b8b-6851-4211-9d97-eabd35172bfa|
19:08:40||databases/.idea/dataSources/b6d9a0f3-4db5-4b22-a0ce-bf08e8e6e3e4.xml|64|1|1685298243|60f02f09e00bdfb6d505005dcd40d2fc|1197677|00078791oc4q5le55v8o|12||204|1197677|1681203007|4fba1938-3ebd-4c93-a9b1-a2f2cf69b9ef|
19:08:40||databases/.idea/dataSources/6504623a-0d39-493e-873f-db4ba58cbef1.xml|64|1|1685298617|e9032aaf8904778eaafcb9574c647979|17548194|00078804oc4q5le55v8o|12||204|17548194|1681203573|58a98a68-1a07-40dc-9e98-300df8323de4|
19:08:41||databases/.idea/dataSources/c2c8f4be-8e40-44ba-8506-ad5a87210a4d.xml|64|1|1685298390|c7d3f4ebb5388b6d5a10550911ec6bfe|87696|00078796oc4q5le55v8o|12||204|87696|1681203292|b045bc15-b5d2-473b-af32-8664976fe49a|
19:08:41||databases/.idea/dataSources/df6cdc8f-02fc-40c1-b6b4-9e8b4b099621.xml|64|1|1685298236|0af23b6d304c0767ed620be5f758507f|129682|00078798oc4q5le55v8o|12||204|129682|1681202986|68082135-15ae-44a4-b99c-18748c998ec2|
19:08:41||databases/.idea/dataSources.local.xml|64|1|1685299796|0f94e4f73c873bdf644e57155011f1b5|14047|00077838oc4q5le55v8o|12||204|14048|1681049715|9cc7b463-bfaf-4ae7-b568-760af2954b15|
19:08:42||databases/.idea/dataSources.xml|64|1|1685299796|909cdf38ca85df245fea090a0cc1cdf7|5457|00077841oc4q5le55v8o|12||204|5457|1666168926|d93c078f-6b9a-440b-8a22-ad2be3f00295|
19:08:42||databases/.idea/workspace.xml|64|1|1685298262|7a6bd15edbfc370fd182e243f5cee4f9|2384|00078802oc4q5le55v8o|12||204|2516|1681196946|da15e139-9e4f-42de-9864-ca72bcf55c30|
19:08:44||databases/.idea/dataSources/922df5b9-4496-4de8-99c9-74de5ad18c7a.xml|64|1|1685298390|54147a7788dea120ac2cf0c214ead103|17514003|00078795oc4q5le55v8o|12||204|17514003|1681203292|b15ca06e-4cfb-48f3-ac8a-5566ce635a5d|
#=#=#=# Syncrun finished 2023-05-28T19:08:47Z (last step: 24137 msec, total: 1087340 msec)

As you can see, the propagation is starting after almost 20 mins of the sync run event. This is happening only for some large folders in my desktop. For another smaller folder, the propagation is starting within a few seconds of the sync run and on my laptop, all folders are behaving in a similar way.