Index gets corrupted when device stops syncing due to storage quotas

I’ve ran into this issues three times in the last two months. I’m syncing an encrypted to a device with limited storage, and stupidly try to sync files larger than it has room for. It happens, right? The thing is, the database index for the folders that are paused due to the folder storage quota limits gets seriously out of wack. Every file is out of sync on the device that ran out of space.

Newly added files to the folder syncs to every other device, but older files won’t sync to any other devices. I notably see complete copies of the newly created files named ~syncthing~.TheRealFile.ext.tmp in the folder on the device that previously ran out of disk space. The file’s checksum matches he expected file, but Syncthing doesn’t ever (at least, not after 50+ hours) move it into place.

I need to cut the offending folder down to size, and then temporarily pause sync and reset that folder on every device. Until I perform this ritual, the folder will display generic pull errors on the device that ran out of space.

It also cause any “receive encrypted” type sync recipients of that folder to generate a new locally conflicting zero-byte length file every couple of minutes. Again, resetting that one folder on every device (even devices that were offline at the time!) fixes this issue too.

I run Syncthing on one FreeBSD, macOS, Android, Windows, and Linux device. I guess this many devices/environments is asking for trouble? I love it for supporting so many devices, though. It works most of the time, but I get stupidly-difficult-to-resolve conflicts and sync issues maybe once a month. The most frequently observed error is the generic pull error with nothing more useful in the logs.

I really wish there was a bug button per folder labeled “Hard Reset” that told every device to reset the folder and consider whatever device pressed the button to be the new golden master. I’ve needed this so many times over the years. (Although, considerably less often in the last two years.)

I’m not sure if I can provide anything too useful to help debug this problem. I turned on every logging option, and it just says generic pull error. Nothing about checksum mismatches or permissions or anything else that looks like it’d be a problem.

I guess I’m not asking for help. I just want to share my problems with Syncthing. I love it a lot, but I also hate it. 99% of the hate is over the lack of sync conflict resolution and troubleshooting tools. I need errors that says what went wrong, or what I can do to resolve it. Unknown? Give me a nuclear option (hard reset). I hate spending time going between devices to reset or alternatively recreate a folder because Syncthing messed up.

Furthermore, I consider that Carthage must be destroyed.

So you have your database on a volume with storage quota, so if Syncthing wants to write to the db, or the db-backend wants to write transation logs, yous system prevents that?
If that is the case, you cannot blame syncthing for a damaged database.

Syncthing tries quite hard to avoid this by checking for available space before performing sync operations. It’s tricky though if the system says there is free space but then denies the writes.

My bad, I don’t mean storage quotas. I meant to refer to Syncthing’s Minimum Free Disk Space setting but misremembered what it was called.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.