Raspberry Pi 3 - disconnects after 4-8 seconds then reconnects after 40-90 seconds, repeat

I have recently switched to syncthing from resilio-sync. I have managed to get it working fine easily enough across my Android phone, Windows PC, Linux PC, and ancient work PC. However, I am experiencing issues with it on my Raspberry Pi 3.

I have installed syncthing on a clean installation of Raspbian Lite and the syncthing package I installed is from the Raspbian repositories. The folders it syncs are webdav mounts shared from a NAS. I made the mistake three years ago of buying a cheap entry-level NAS that can’t handle running any additional software on it despite the claims of the manufacturer. Hence, I use a raspberry pi to gain functionality such as file syncing.

I managed to get it installed, make GUI accessible remotely, add devices, and setup folders fine. However, 4-8 seconds after it makes a connection it disconnects to then reconnect 40-90 seconds later and repeat ad infinitum. The memory and CPU load when syncthing is running isn’t more than the pi can handle. Around 40% CPU whilst starting up, and ranging up to 70% when first connected before crashing. RAM tends range from 80mb - 110mb.

Running syncthing as a command, it looks like when it disconnects is from syncthing crashing and then restarting. I had to turn on unlimited scrollback in konsole to capture the full output when it crashes. The main part is:

[Y6SNQ] 14:50:20 INFO: Established secure connection to [redacted] at (tcp-server) (TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384)
[Y6SNQ] 14:50:20 INFO: Device [redacted] client is "syncthing v0.14.46" named "Insomnia"
[Y6SNQ] 14:50:21 INFO: Failed to exchange Hello messages with [redacted] ([fe80::77f3:a46c:2217:93a0%eth0]:35790): EOF
runtime/cgo: pthread_create failed: Resource temporarily unavailable
SIGABRT: abort
PC=0x76d8645c m=2

There is then a 5,203 lines of further output of highly repetitive messages that I have uploaded to a pastebin.

Can you post the full long from start to finish? Also, try an official release from github.

1 Like

Thanks for the reply. Tried an official release from github and it appears to be working. It’s cleared out the names from my original config, but kept the devices and folders so can fix that later. Running for 10 minutes now and there’s only been one reset (INFO: Restarting monitor…) which was about 1 min after running it for the first time, so may just be setup related. Transfer speed seems to be 3-5MB/s which is around 4MB/s less than I got with resilio-sync but that’s been the same with all my devices.

How would I make the binary downloaded from github work with systemd. I already added an init script based on this guide, so can I simply just symbolically link the binary to /usr/bin?

There are plenty of guides on the internet. I would not replace the binary you installed with the OS package manager, as binaries off github self-update, where was the ones shipped by package managers do not.

It also could be that you might just need to reinstall the package provided by your OS, as it might ended up being a corrupt download or something.

If raspbian lite is debian based and you already use systemd, I’d recommend using Syncthing’s own repo: apt.syncthing.net
If not, just use the binary from github, which will self-update, and place the systemd units that are included in the appropriate places…

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