Syncing Getting Stuck

I’ve noticed more and more recently that my SyncThing installations will get stuck. I won’t notice for a while, and then I’ll do something expecting the latest version of a file to be there, and it won’t be, and I’ll log onto the machine and see that the syncthing process is still running, but all the folders are “Unknown” and all the other devices are disconnected.

Often, device A will claim to be able to see device B, but device B will show device A as disconnected.

If I restart syncthing several times it eventually sorts itself out, but the longer things have been stuck for, the longer it takes to resync everything, and more likely it is to get stuck again in resyncing.

I have not yet managed to find any useful error in any log file.

Where should I be looking?

We had a few locking issues that were fixed recently. What version are you running?

v0.14.11, Windows (64 bit)

Can you pinpoint which version this started happening in? Can you also run with STDEADLOCKTIMEOUT=300 env var? Debugging section in the docs explain how.

Couldn’t say when it started. I’ve been noticing it in the last month or two.

I’m pretty sure I’ve set the environment variable. I set STTRACE=model at the same time, and that’s definitely worked.

Now I guess I just wait for it to stall again =)

STTRACE=model is just verbose debugging, we are more interested in deadlocks. If you could try different versions released in the past month, I’d be interesting to see which version introduced it, as a few people have been complaining about this.

I’ve just set the same settings on a different machine (that just got stuck) and still has lots of data that needs syncing and is next to the other servers with a fast network, so it should be a good environment for reproducing the problem.

Is STDEADLOCKTIMEOUT=300 supposed to just produce extra logs when the problem occurs? Or to cause the deadlocks to timeout so that the problem doesn’t occur and it doesn’t stay stuck?

Does stuck mean web ui is not loading or stuck in unknown state?

If not, then its something else, otherwise you need to set STTRACE=sync and STDEADLOCKTIMEOUT=300 which will cause it to crash and print out stacktraces when it fails to get the lock in 5 minutes, which is what i am after.

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