Two evenings ago I was trying to sync files from Kdrive to the local drive and it kept getting blocked. I wasn’t clear as to why this was happening until I saw that Pi-Hole had throttled the IP address of the computer that was attempting to sync from Kdrive. It did this one in the morning, and the second time in the evening.
I suspected that for some reason the computer might go to sleep when it isn’t used, but a Pi doesn’t sleep, so that wasn’t it.
## Temporarily Disable Pi-Hole
When I disabled blocking by the Pi-Hole and tried to sync once again it worked flawlessly. It took hours but the data was transferred from the remote machine to the local machine over the next twelve hours, or so.
## Rate Limiting by Pi Hole
Pi-Holes will tolerate up to [1000 requests per minute](https://docs.pi-hole.net/ftldns/configfile/) from a device under normal circumstances. Usually a system would make a few dozen requests at a time depending on the website being visited. When you’re synching gigabytes of files via a cloud client it might send several thousand requests as it receives requests, and provides status updates on whether packets are received and when to send the next one. This is a generalisation. I could not find specifics for Kdrive.
## The Wrong Assumption
Aside from considering a computer going to sleep and stopping data transfer I also considered that the cloud provider would throttle download queries, and speed. When I tried to download data from iCloud I did encounter a similar problem and when I tried from one or two other providers I seemed to have the same problem.
## Interesting to Know
When I tried to download several 2 gigabyte files manually with the Raspberry Pi I found that it sometimes saturated its 8 gigabytes of ram before slowing down to a crawl. It doesn’t like downloading large files in bulk. I came across this bug several times.
## And Finally
In normal circumstances cloud synching is a few files at a time, rather than several hundred gigabytes at once, so you don’t run into this issue. If this was a normal situation then I would modify Pi-Hole to have a higher rate limit, but for now I will leave it as it is.
Leave a Reply