out of memory crashes

Im currently using syncthing to share tons of small files to multiple user & multi site.

One of my device have been experiencing crashes nearly a daily basis(office hour only, weekend when the office is empty or when sycnthing is stopped during office hour, it runs fine.).

This device is Orange Pi Zero, 512MB Ram, in the office where 6 staff is located, act as one of the dedicated backup device for the office. it was running fine for a year before this frequent crashes, and ram usage has been steady increasing over time. I also have RPi 2 running offsite, working well so far,running sycnthing for backup, among other things (same as OPi Zero).

total watched folder is 6. Current total file count is near 100,000 files, 20,000 folders ~120 GiB

I’m currently replacing it, but i wish to re-purpose this device as secondary offsite synchting backup.

So, other than either reducing watched folder or upgrading device, any ideas how to reduce ram usage?

Upgrade to 1.4.0-rc.1 because it contains a few fixes to scale better. If you’re serving content to a lot of devices, set the (new) option maxConcurrentIncomingRequestKiB to 32768.

If that doesn’t help, run some memory profiling. Start with STHEAPPROFILE=1 and it will create files when RAM usage increases. The last one before it crashes will be the most interesting one. :slight_smile: We might be able to catch some more low hanging fruit.

Try setting the GOGC to a value below 100 (like, GOGC=25) to force more frequent garbage collection and hence lower memory overhead at the price of higher CPU usage.

And consider adding some RAM. :slight_smile:

1 Like

I will try it when i set it up.It currently offline since i already replaced the SBC. the secondary offsite location kinda far, so i cant do it any time soon.

Adding ram to SBC(BGA soldering) is a hassle. :grin: It cost me ~20USD for OPi Zero + complete accesories (w/o HDD). buying a newer SBC is easier, thats why i already replaced the sbc.

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