Syncthing Out of Memory

Hello!

I’m running Syncthing on two Windows server on the same local network and both sides periodically crash and Syncthing stops then I have to start it again.

Both of these servers are running Server 2022, have 8 CPU cores, 32 GB of RAM, plenty of free space. One folder is being synced between them that is 1.57 TB and 5.5 million files. Below is the log before it crashed on one of the servers. Any settings changes I should be doing for this scenario?

[CPCY7] 2025/03/10 11:23:30 INFO: Listen (BEP/tcp): TLS handshake: EOF [CPCY7] 2025/03/10 11:23:30 INFO: Established secure connection to VQBJ2EU at [fe80::1884:4b71:950:fbf0%Ethernet]:22000-[fe80::c9fb:7889:7e32:7a35%Ethernet]:22000/tcp-server/TLS1.3-TLS_AES_128_GCM_SHA256/LAN-P10-61BF9D8V8I0QG8DI1G0QUKU1CO [CPCY7] 2025/03/10 11:23:30 INFO: Additional connection (+1) for device VQBJ2EU at [fe80::1884:4b71:950:fbf0%Ethernet]:22000-[fe80::c9fb:7889:7e32:7a35%Ethernet]:22000/tcp-server/TLS1.3-TLS_AES_128_GCM_SHA256/LAN-P10-61BF9D8V8I0QG8DI1G0QUKU1CO [CPCY7] 2025/03/10 11:23:30 INFO: Lost primary connection to VQBJ2EU at [::]:22000-192.168.98.68:22000/quic-client/TLS1.3-TLS_AES_128_GCM_SHA256/LAN-P20-61BF9D2IH2B7O6NT5NI29PD36O: replacing connection (1 remain) [CPCY7] 2025/03/10 11:23:48 INFO: Detected 0 NAT services [CPCY7] 2025/03/10 11:23:51 INFO: Joined relay relay://23.95.107.171:22067 Panic at 2025-03-10T11:26:31-04:00 fatal error: out of memory

Are you using a 32 bit build of Syncthing by mistake?

In the GUI, it shows v1.29.2, Windows (64-bit Intel/AMD)

While Syncthing isn’t running, how much system memory is free?

Anywhere from 16 - 20 GB

Syncthing has a profiling feature, but if the out-of-memory problem is frequent enough to see it happening, use VMMap to see if it’s Syncthing that’s exhausting available memory or it’s losing out to another process.

I couldn’t find anything specific about how much memory Windows’ filesystem event notification uses (in Linux it’s 1,024 bytes per file watched, so 1 million files requires 1GB of RAM). Combined with file caching, etc. syncing 5.5 million files could require several gigabytes of RAM, but it’s just extrapolating from what I’ve seen with my own setup with >1 million files.

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