Hello beautiful people! I'm experiencing a new issue with Syncthing (linuxserver) on Unraid these last few weeks, possibly something that occured after upgrading Unraid to 6.11.1(?). I saw a post about similar issues on the Syncthing subreddit as well, so it seems I might not be the only one.
I'll mention that I'm somewhat a Unraid and homeserver/linux rookie.
Issue:
Syncthing is all of a sudden refusing to delete directories in "receive only"-folder on Unraid because they're not empty. This has never been an issue before. The directories are supposed to be deleted with content as they're deleted or moved from my seedbox's "send only"-folder. Interestingly, the issue might be limited to folders that have been "touched" by Sonarr/Radarr (on Unraid).
Setup/how it used to work:
On my seedbox, completed downloads are automoved to a "completed" directory. This directory is a "send only" folder in Syncthing.
Content in "completed" folder are synced to "receive only"-folder on Unraid server. This folder is monitored by Sonarr/Radarr. Sonarr/Radarr, in turn, hardlinks these downloads to their designated directories elsewhere.
On seedbox: After some time the download will either get moved to a different directory, or deleted. Both of these options means that the download is removed from the "send only"-folder, and when synced by Syncthing, also deleted from my "receive only"-folder on Unraid. It's all nice and clean and just how I like it.
Past few weeks (I think):
When the download is moved/deleted on seedbox (step 3), Syncthing (on Unraid) will eventually just show the red "Out of sync"-warning. The out of sync items are the downloads (usually directories) that no longer exists on the seedbox side, and therefore should be deleted on the receiving end. Syncthing on Unraid states, however, that the directory/directories could not be deleted because they're not empty.
The directories does not contain any hidden files (as far as I can tell), and I can't find anything else that seems odd with these folders...
Pressing the "Revert local changes"-button removes the directories with their content, and "fixes" the problem, but I obviously don't want to keep doing this manually.
Maybe an important detail: This seems to only happen to content that's been "touched" by Sonarr/Radarr before removal. If I create a new directory with a few files on the seedbox, let it sync, and then delete it, it is successfully deleted on Unraid as well.
This is driving me crazy. Any ideas?
Side note: I also feel like scanning takes a lot more time now than it used to as well, although I cannot be completely sure. I do however often see the scans taking a long time (like several minutes for one 10GB movie file or something like that), with very high CPU usage (like 80% on all cores, i5-8400), while I never noticed this earlier, so something seems to have changed.
Both Syncthing installs are v1.22.1. Unraid 6.11.2 (same issue on 11.1).
Edit: I just checked the logs a little closer and found this:
First, it says "directory has been deleted on a remote device but contains changed files, scheduling scan"
Then it rescans
And finally it says "directory not empty".