This might sound like a stupid question. How is the interval calculated? How is the interval determined?
I can think of 2 possibilities.
1 - The interval is calculated based on the starting of the interval until the interval time has passed. In this way ST does not care if the scan takes a long time or not.
2 - The interval is started only after a full scan is done. This way the internal is a real interval because this way ST actually does not count the scan time at all.
The reason I am asking is that I have somewhat big repos (couple gigs with alot of files) on Arm devices, and I feel like ST is constantly running even If I set them to like 2400s.
Is it possible that the scans take a long time and by the time the scan is finished ST restarts the scan? Some of my repos are on my external sd and encrypted folders and the r/w performance is not super on those.
I know I can set them independently. My question is more about if they overlap? What If I do not want overlap so that my device can rest a while before starting a new scan given that I have multiple shares.
Each folder will run scans on its own schedule, decided by its configured interval, how long the scans actually take, plus a small random offset per scan. The latter is to avoid attempting to scan all folders at the same time, so there’s nothing you can do to force that to happen.
Well, you could disable periodic scans and schedule them via the API, but…
I see. In that case I have to set a huge number than which is not what I want.
I do not know anything about the Rest or the Api stuff. Is there an easy way that I can set this up? I do not mind forcing manual scan on my arm devices. And how do I disable periodic scan?
I’m pretty sure you can disable periodic scans by setting the interval to zero. The do something like curl -X POST -H X-API-Key:yourapikey http://localhost:8384/rest/db/scan?folder=somefolder when you want to scan a given folder, from cron or so. The rest API docs on the docs site has the details, the above is from memory at the moment (on a phone…).
If you can configure your browser to send POST requests, sure.
Also, you might be interested in https://github.com/syncthing/syncthing-inotify. This will watch your filesystem for changes and inform them to Syncthing using the same API as described in previous posts. Syncthing-Inotify will also automatically delay Syncthing’s rescan interval as long as it’s running.
So I tried the curl method. I am not sure if it is working or now but I get “CSRF Error” at the bottom of the message. At the top I have “301 moved permanently”
Is this expected?
Also is 8384 a rest api port or is this supposed to be the standard 8080 port?