I have a Windows 2008 server with 40 million small files on this server that need to be synchronized!

I need to sync the files of this windows server to linux!

After I added the task, this task has been in the scan! It has been 2 days! When scanning, the memory usage is very high, and even all the memory is full!

In the past two days, syncthing has performed an automatic restart at least 3 times!

Is this normal?

Progress updates (for the percentage info in the gui) safe all filenames to be hashed, which in your case is huge. Set progressUpdateIntervalS to -1 to disable those progress updates, that should get your memory usage down (https://docs.syncthing.net/users/config.html#options-element).

EDIT: It’s ScanProgressIntervalS which is relevant for scanning, the progress one is for pulling. Both are probably relevant to you.

Ok,me try Thank you!

@xkwy521 See my edit above: I mixed up the names, it’s scanProgressIntervalS that’s relevant to scanning, but you probably want to set both to -1 (the other is for syncing).

As a side note: @AudriusButkevicius Do you remember the argument for buffering a list of files to hash instead of walking the filesystem twice and just counting the files to be hashed on first walk? There’s the overhead of walking twice but there could then be an option to switch between walking twice (low mem, higher disk usage) and walking once (high mem, lower disk usage).

To have a consistent view. If files get added or deleted between walks we’ll return 110% scans etc.

No, I wait for the sync to complete before I add and delete

I am afraid that there will be errors during the synchronization process!

thank you for the help @AudriusButkevicius @imsodin

I am prompted for this on my synced Linux backup server! How to solve? please help me!

@AudriusButkevicius @imsodin

Has been resolved, is a firewall problem

NO, not a firewall error, I will still have this error when I close the firewall!

Also, according to the above method, after setting the ‘progressUpdateIntervalS’ and ‘ScanProgressIntervalS’ parameters, the windows server that needs to be synchronized, ‘syncthing’ only scans 8,841,021 files, it has been 6 hours, and no number has been increased! How to solve this? please help me!

That error originates from decoding json, I don’t understand how tcp comes into that. Ignoring the concrete error I could imagine that your config changes timed out due to the high load of scanning. So maybe the progress settings didn’t even take effect (check the config.xml directly).

These settings mean there is no status update on how far the scan has progressed. If you have 40 million files that all need to be hashed and compared between devices, that’s going to take more than 6h. Have some patience.

I have crashed, still can’t sync

The number of scanned files is always stuck at 8841201!

was it an out of memory crash? can you post logs

Yes, the memory has run out, the server is very card!

Is there a way to reduce memory usage! Can increase the hard disk usage rate!

Can you switch off syncthing, set the two settings manually by modifying the config, and start it again? I am not convinced the settings were applied based on the errors you posted.

1 Like
<configuration version="28">
<folder id="***" label="***" path="D:\wwwroot\***" type="sendonly" rescanIntervalS="15552000" fsWatcherEnabled="true" fsWatcherDelayS="10" ignorePerms="false" autoNormalize="true">
    <device id="***" introducedBy=""></device>
    <device id="***" introducedBy=""></device>
    <device id="***" introducedBy=""></device>
    <minDiskFree unit="%">1</minDiskFree>
<device id="***" name="CA-8" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
<device id="***" name="WIN-0R08VG0GBSD" compression="metadata" introducer="false" skipIntroductionRemovals="false" introducedBy="">
<device id="***" name="OL-FR-4-J" compression="never" introducer="false" skipIntroductionRemovals="false" introducedBy="">
<gui enabled="true" tls="false" debugging="false">
    <minHomeDiskFree unit="%">1</minHomeDiskFree>

This is the configuration on my window server @AudriusButkevicius

Looks right. Can you capture all logs when it’s running and provide them after it crashes?

Ok, I will try and feedback