Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Cache directory filling up disk on server

Solved by David Meissner View solution

Started by David Meissner 3 weeks ago · 3 replies · 248 views
3 weeks ago

I just moved my Grav site from a Fedora server to a Debian server. Both are basic servers on Digital Ocean, with 25GB of disk. I never paid much attention to disk space on the Fedora server, everything just worked. But in the one day since I've had Grav on Debian, the cache directory grows continuously. It filled the disk once, but now I'm checking on it a few times a day and clearing cache manually. I see that there are scheduled jobs available that can clear cache, and I plan to look into how to get these working with the system timers on Debian. But I don't think these were enabled on my Fedora server and I never had this problem.

I've copied my Grav site to other Debian servers many times, when testing something at home for example, and I haven't seen this issue. Any suggestions on what might be causing it?

Thank you,

David M

3 weeks ago

An update: I see the cause of the problem, it's a constant stream of bot connections with the user agent identified as "Go-http-client". I see a few of these in the logs on the original Fedora server, but for some reason I started getting about one per second after bringing up my site on the Debian server last Friday, the 23rd. It must be a coincidence, just my bad luck that the bots found me? Anyway, I'll have to figure out the scheduler to get the cache cleared automatically, but I may have to run it more than once a day if this keeps up.

3 weeks ago

Another update: I enabled the scheduler and it seems to be running, the system log shows the Grav scheduler running once per minute and the Grav admin shows that the cache-purge and cache-clear jobs were run. But the disk was still at 80% full when I checked in the morning. I just ran cache-clear manually and it looks OK. All the bots are doing is issuing a POST, for example: '"POST / HTTP/1.1" 200 7545 "-" "Go-http-client/1.1"', one per second at least, from tens of thousands of different IPs. Does that POST by itself cause additions to the cache?

I know this is getting outside of a Grav question, I'll have to figure out some other solutions. I'll see if I can add scheduler jobs to clear the cache more often while I look into network solutions.

2 weeks ago Solution

I'll mark this issue solved. The scheduler is running. I took the site down for a while and brought it back up with a new IP address, and the flood of POSTs has stopped.

👍 1

Suggested topics

Topic Participants Replies Views Activity
Installation & Hosting · by vollstock, 4 days ago
3 97 4 days ago
Installation & Hosting · by David, 7 years ago
3 3395 2 weeks ago
Installation & Hosting · by David Meissner, 3 weeks ago
0 172 3 weeks ago
Installation & Hosting · by Anthony J Cervo, 4 weeks ago
3 237 3 weeks ago
Installation & Hosting · by motorambler, 2 months ago
9 923 2 months ago