Thousands of non-existent "Out of Sync Items" appear when playing around with .stignore

First of all, this is happening in my test folder, which I have used strictly for stress testing Syncthing. Hence, I am creating this topic in Development and not in Support. Please feel free to move it to Support if it is more adequate for troubleshooting this.

Anyhow, I have a folder that has endured a lot of different testing, but right now is completely empty.

In this state, I add * to .stignore. Everything seems to work normally, but strangely enough it takes 5+ seconds to do the operation even though the folder is empty.

Then, I remove * from .stignore and the madness begins.

Once finished after ~15 seconds, the folder does come back to normal. However, one strange thing is that the “Latest Change” also gets overwritten in the operation. The .STVERSIONS listed there was actually deleted about 1 week ago, but the date of the deletion keeps being updated each time the .stignore operation is performed.

I can reproduce this at will, so the problem does not fix itself. The “Out of Sync Items” themselves seem to list the previously used files, which are long gone, but somewhat seem to be still present in the database?

I personally am not sure what exactly is going on here. Does anybody have any idea? As this is a test folder, I can share the whole database if necessary.

I am using the main branch ( for testing.

Is there another device?

The what you describes is expected: When ignoring or unignoring everything, all the info internally switches from being invalid to being deleted. When switching from invalid to deleted, it then enters sync-preparing to check if the newly valid files are the same as on remotes (which they are, being deleted on both sides).

Yeah, there is another device, where the folder is also empty though. This happens, however, also when that device is offline.

Is this completely normal then? Do deleted files pile up and are kept like this indefinitely?


Hmm, what about the “Latest Change” being updated to the current date each time this is done, even though in reality the file/folder was deleted a long time ago?

I have also now unshared the folder and removed the remote device all together, and although there are no “Out of Sync Items” listed in the GUI anymore, the folder still takes a long time to ignore and unignore *. I guess the only way to get rid of this is to wipe out the database. Is this right?

Edit: Removing the database does solve the issue. If the files are really stored with no time limit like that, I guess that a periodic database wipe out may not be such a bad thing…

1 Like