"Scanning" never stops

Syncthing v1.27.3, Windows (64-bit Intel/AMD)

I ran ST with STRACE=scanner and it scans all the files it seems then the debugging stops eventually however the folder scanning never stops as seen in the picture, as you can see “rescan” is also grayed out.

I do not want to delete the database because that would literally cause so many conflicts with other devices, since I do not know what is synced and what is not and you can see there are hundreds of thousands of files there.

Is there anything I can try to force a scan or something to get this going?

Here is the tail of the log when the scanner stops

https://paste.debian.net/hidden/649a946e/


[PRHKA] 2024/02/08 00:00:54.141150 walk.go:182: DEBUG: walker/dFOLDER2@0xc000102dc0: Walk dFOLDER2 [] current progress 578973/578974 at 0.0 MiB/s (99%)
[PRHKA] 2024/02/08 00:00:54.141150 walk.go:195: DEBUG: walker/dFOLDER2@0xc000102dc0 Walk progress done dFOLDER2 [] Matcher/[]@0xc00037e630
[PRHKA] 2024/02/08 00:00:54.141150 verboseservice.go:43: VERBOSE: Scanning folder "dFOLDER2", 99% done (0.0 MiB/s)
[PRHKA] 2024/02/08 00:00:54.142186 verboseservice.go:43: VERBOSE: Local change detected in folder "dFOLDER2": modified file obsidian\plugins\home-tab\data.json
[PRHKA] 2024/02/08 00:00:54.142186 verboseservice.go:43: VERBOSE: Local change detected in folder "dFOLDER2": modified file obsidian\plugins\obsidian-completr\scanned_words.txt
[PRHKA] 2024/02/08 00:00:54.142186 verboseservice.go:43: VERBOSE: Local change detected in folder "dFOLDER2": modified file obsidian\workspace.json
[PRHKA] 2024/02/08 00:00:55.498202 verboseservice.go:43: VERBOSE: Summary for folder "dFOLDER2" is &{Errors:0 PullErrors:0 Invalid: GlobalFiles:16208 GlobalDirectories:944 GlobalSymlinks:0 GlobalDeleted:2222 GlobalBytes:5537787360 GlobalTotalItems:19374 LocalFiles:16208 LocalDirectories:944 LocalSymlinks:0 LocalDeleted:2222 LocalBytes:5537787360 LocalTotalItems:19374 NeedFiles:0 NeedDirectories:0 NeedSymlinks:0 NeedDeletes:0 NeedBytes:0 NeedTotalItems:0 ReceiveOnlyChangedFiles:0 ReceiveOnlyChangedDirectories:0 ReceiveOnlyChangedSymlinks:0 ReceiveOnlyChangedDeletes:0 ReceiveOnlyChangedBytes:0 ReceiveOnlyTotalItems:0 InSyncFiles:16208 InSyncBytes:5537787360 State:scanning 00:00:02 -0600 CST Error: Version:29069 Sequence:29069 WatchError:}
[PRHKA] 2024/02/08 00:00:55.498202 verboseservice.go:43: VERBOSE: Completion for folder "dFOLDER2" on device aaaaaaaaaaaa is 99.9895450481869% (state: valid)
[PRHKA] 2024/02/08 00:00:55.498202 verboseservice.go:43: VERBOSE: Completion for folder "dFOLDER2" on devicevvvvvvvvvvvvvv is 99.96558304109388% (state: unknown)
[PRHKA] 2024/02/08 00:00:56.188331 verboseservice.go:43: VERBOSE: Device aaaaaaaaaaaa sent an index update for "dFOLDER2" with 1 items
[PRHKA] 2024/02/08 00:00:57.500201 verboseservice.go:43: VERBOSE: Summary for folder "dFOLDER2" is &{Errors:0 PullErrors:0 Invalid: GlobalFiles:16208 GlobalDirectories:944 GlobalSymlinks:0 GlobalDeleted:2222 GlobalBytes:5537787360 GlobalTotalItems:19374 LocalFiles:16208 LocalDirectories:944 LocalSymlinks:0 LocalDeleted:2222 LocalBytes:5537787360 LocalTotalItems:19374 NeedFiles:0 NeedDirectories:0 NeedSymlinks:0 NeedDeletes:0 NeedBytes:0 NeedTotalItems:0 ReceiveOnlyChangedFiles:0 ReceiveOnlyChangedDirectories:0 ReceiveOnlyChangedSymlinks:0 ReceiveOnlyChangedDeletes:0 ReceiveOnlyChangedBytes:0 ReceiveOnlyTotalItems:0 InSyncFiles:16208 InSyncBytes:5537787360 State:scanning 00:00:02 -0600 CST Error: Version:29069 Sequence:29069 WatchError:}
[PRHKA] 2024/02/08 00:00:57.500201 verboseservice.go:43: VERBOSE: Completion for folder "dFOLDER2" on device aaaaaaaaaaaa is 99.9997524101395% (state: valid)
[PRHKA] 2024/02/08 00:00:57.500201 verboseservice.go:43: VERBOSE: Completion for folder "dFOLDER2" on devicevvvvvvvvvvvvvv is 99.96558304109388% (state: unknown)
[PRHKA] 2024/02/08 00:00:58.537627 verboseservice.go:43: VERBOSE: Device aaaaaaaaaaaa sent an index update for "dFOLDER2" with 2 items
[PRHKA] 2024/02/08 00:00:59.501438 verboseservice.go:43: VERBOSE: Summary for folder "dFOLDER2" is &{Errors:0 PullErrors:0 Invalid: GlobalFiles:16208 GlobalDirectories:944 GlobalSymlinks:0 GlobalDeleted:2222 GlobalBytes:5537787360 GlobalTotalItems:19374 LocalFiles:16208 LocalDirectories:944 LocalSymlinks:0 LocalDeleted:2222 LocalBytes:5537787360 LocalTotalItems:19374 NeedFiles:0 NeedDirectories:0 NeedSymlinks:0 NeedDeletes:0 NeedBytes:0 NeedTotalItems:0 ReceiveOnlyChangedFiles:0 ReceiveOnlyChangedDirectories:0 ReceiveOnlyChangedSymlinks:0 ReceiveOnlyChangedDeletes:0 ReceiveOnlyChangedBytes:0 ReceiveOnlyTotalItems:0 InSyncFiles:16208 InSyncBytes:5537787360 State:scanning 00:00:02 -0600 CST Error: Version:29069 Sequence:29069 WatchError:}
[PRHKA] 2024/02/08 00:00:59.501438 verboseservice.go:43: VERBOSE: Completion for folder "dFOLDER2" on device aaaaaaaaaaaa is 100% (state: valid)
[PRHKA] 2024/02/08 00:00:59.501438 verboseservice.go:43: VERBOSE: Completion for folder "dFOLDER2" on devicevvvvvvvvvvvvvv is 99.96558304109388% (state: unknown)
[PRHKA] 2024/02/08 00:01:17.391132 verboseservice.go:43: VERBOSE: Folder "dFOLDER2" is now idle
[PRHKA] 2024/02/08 00:01:59.364831 service.go:677: INFO: Parsing dialer address 0.0.0.0:22000: parse "0.0.0.0:22000": first path segment in URL cannot contain colon
[PRHKA] 2024/02/08 00:03:09.593134 service.go:677: INFO: Parsing dialer address 0.0.0.0:22000: parse "0.0.0.0:22000": first path segment in URL cannot contain colon

The GUI shows it’s set to scan the folder every six minutes. You probably want something higher. Perhaps you inadvertently dropped a zero from the default 3600 seconds (one hour) when editing the folder. It’s on the advanced tab in the folder editor.

1 Like

I wonder if it’s triggering a rescan the moment it finishes the previous scan. So it’s always in scanning.

1 Like

I changed the scan time frame to half an hour and it still says scanning. In fact I deleted everything in the folders and copied everything back (even removed and added the shared devices again), and still has the same issue. I am suspecting that this might be an issue with the number of files. These are all settings, projects files etc so there are hundreds of thousands of small files in there.

I see a line like this, I wonder if it is stuck somehow due to one of the clients

[PRHKA] 2024/02/08 19:15:55.558647 verboseservice.go:43: VERBOSE: Completion for folder "SETTINGS" on device xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx is 95% (state: valid

I guess I forgot to mention but this folder is a network drive shared by another Windows 11, would that be an issue? If so what would the remedy be?

My guess would be that a scan simply takes a very long time on that network share, and that filesystem notifications are not possible on network drives. Better to run Syncthing in the actual place the files are stored.

1 Like

That would be nice, but that is not possible due to the setup. I already disabled file watching. Is there another faster file detection I can try?

If there is, I’m not aware of it.

1 Like

Maybe another option would be to configure multiple sync folders in Syncthing, each with different rescan intervals, so you could have a dir that changes more frequently set to scan every 10-15 minutes for example, while a larger dir with 100’s of thousands of files in it but which changes less frequently, only rescan every hour…