Hi
I am using rclone rc version 1.49 to list files within 3 days max-age in a linux machine and copying them into ObjectStore.
The application sends rclone list command to a remote machine every 5min, after processing retrieved list of files it send rclone rc sync/copy command to copy only the directories that we know do not exists in ObjectStore. The frequency of copy command is only couple of times per hours and each directory is about 20M.
On every occasion the rclone-rc process was using a huge amount of system resources, particularly system memory and caches, well over 60% of system ram (nearly 10 Gb!), another 15 Gb of swap space.
any help to debug such memory leakage will be highly appreciated
Thanks for the reply. As we are in prod env changing version is not that easy
Do you think upgrading rclone will resolve the issue? Actually rclone on Windows has no memory issue. We only have problem with linux one.
Also I read about mmap flag. Is the fix in the latest version has something to do with mmap flag. Do we need to enable it to see the difference.
While we are testing new version of rclone I have another question.
We have set JobExpireDuration to 1 day. Do you think this may contribute to such high memory usage?
I am getting error while trying go pprof as described in the above link. https://ip:port/debug/pprof/goroutine?debug=1: Get https://ip:port/debug/pprof/goroutine?debug=1: x509: cannot validate certificate for <ip> because it doesn't contain any IP SANs
The browser is probably trying to redirect the HTTP traffic to HTTPS which won't work since rclone doesn't include any SSL certificate for the rc. You need to change it to to the http variant, not the https variant.
Hi Nick
As soon as running the rclone it starts to create a job per second even if we do not send any rc command. I used job/status to see what are these jobs and they look like core/stats output
rclone generates jobs like this every sec!!
Yesterday after an hour of running rclone I had about 1500 jobs and this number kept growing.
Now, I reduced JobExpireDuration to 2h and currently having only 170 jobs.
But still we have memory problem only on linux machines memory usage just keeps growing linearly until rclone uses about 60% of memory (nearly 10 Gb!, and another 15 Gb of swap space) and the server crash.
We upgraded rclone to v1.51 but no difference
That's probably step 1 as something is running core/stats every 5 seconds. That should not cause high memory usage (I tested as I ran an infinite loop and did a few thousand of them and memory didn't move).
You'd need to grab a debug log when the high memory usage is going on so we can see what is running.
here is rclone memory usage. The points that is dropped to zero was the time that we restarted it.
As you cansee it just goes up. It is not even responsible for doing any heavy task. Just sending us list of files within a specific age (about 10000 files) every 5 min. And copying about 100 folders (each 20Mb) during a period of a day.