One of my systems (let’s call it “Q”) has 3GB RAM. It ran Syncthing just fine for months. A few days ago I’ve added a new device “N” to a big folder (500k files, 1.5k folders, 45GiB) that was previously only shared between “Q” & “L”. “Q” is configured as my introducer. “L” has 32GB RAM, “N” has 16GB - So I don’t see any issues on those.
Is there a way to constraint the memory usage of Syncthing in a way that prevents the system to become unresponsive for many minutes before the oom-killer kicks in and forces Syncthing to restart?
You can use some of the tuning options to reduce memory usage, and you can set GOMEMLIMIT to set a limit for how much the runtime should allocate: Configuration Tuning — Syncthing documentation
I did find “Max Concurrent Incoming Request Ki B” under Advanced → Options which I guess is the same as the mentioned maxConcurrentIncomingRequestKiB and set it to 32768.
I guess for the other’s I’ll have to find where the Debian packager has put the config file in the filesystem..
UPDATE: Is this the right file? /home/syncthing/.config/syncthing/config.xml
UPDATE2: I believe it is, since it contains this which is not the default value:
<maxConcurrentIncomingRequestKiB>32768</maxConcurrentIncomingRequestKiB>
Changing all those settings helped! No more out-of-memory problems. I’ve actually lightened them up again by increasing maxFolderConcurrency from the suggested value 1 up to 2 because it annoyed me that it stopped handling all other folders when one large change requires long transfer times.