Syncthing doesn't resume when Mac wakes from sleep

Syncthing 1.22.2 on macOS Monterey, but it has been happening on a few previous versions of Syncthing as well.

Syncthing starts normally on boot and all is well. Then Mac’s lid is close for any reason.

When the lid is open again, Syncthing doesn’t resume until it’s restarted manually.

My issue is similar to this post (that satyed unsolved).

Any idea welcome, Thanks.

Can you elaborate on what you mean by “resume” specifically? Syncthing isn’t supposed to pause/sleep at all, i.e. it should just continue working as soon as you resume the device from sleep (unless there’s something specific to macOS and/or the wrapper that I’m missing here).

I think a few screenshots showing the problem at hand would be helpful.

Exactly, that’s what I think and expect.

I waited for the next sleep/wake cycle for it to occur again, to have a screenshot. Here you are.

The Mac has been open for ~1hr now. All the ‘Disconnected’ devices should be syncing. Different devices/OS: Android tablet, VPS, NAS, etc.

The only way to get it back is by doing Actions > Restart in the web interface.

Hope this helps you help me. Thanks in advance.

Aha, syncthing is not (re-)connecting to some of the remote devices after suspend-remove - that’s much more concrete and thus helpful than “Syncthing doesn’t resume”.

Two bars means relay LAN, which seems pretty weird (1). Do you have some special setup with your own relay? And could you show screenshots of one of the connected devices expanded and one of the disconnected devices expanded (mainly interested in the connected/discovered addresses).

What should happen is that during sleep-resume the connections are closed, which triggers redialing to those connections. Now either that’s not working or no outgoing connection can be established to remote devices - the screenshots will show the last connection attempt and error doing so. Likely it shows an error. And on the remote it likely takes a while to detect the connection is down, as Syncthing didn’t properly close the connection it just got axed while Syncthing was interrupted. It’s 5min until the remote closes the connection after not getting any pings. So basically I’d expect your connections to come back if you wait that long.

Wtf is “relay LAN”?! I mean if one runs a relay server in a LAN, one might as well run a discovery server instead to get direct connections? And ignoring that and assuming there’s a valid use case (likely and I just can’t think of it), having a separate icon/state for such a niche case seems unnecessary. Anyway, I guess we are married to it now.

This is v1.22.2, so two bars (still) mean “QUIC” in this case :wink:.

1 Like

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