As I logged in to my fediverse instance running on my home server today, I was thinking it was running strangely slow. Opening htop painted an ugly pi

Crushed by AI · Random Notes

submited by
Style Pass
2024-09-27 20:30:09

As I logged in to my fediverse instance running on my home server today, I was thinking it was running strangely slow. Opening htop painted an ugly picture: all the CPU cores were at 100 %. The reason was that my Forgejo instance was being scraped.

The instance contains a couple copies of the QMK firmware, because I've made a couple of my own firmwares and the easiest way is to copy the repo and add a couple of commits on top. One of these repos has around 8000 commits, and the other had over 25 thousand. I made the bigger private, but I left the smaller one since it's linked to from my blog. The firmware repos were being hit at around 10 requests per second, which doesn't sound like a lot, but you have to realise that this is a low powered home server and running git operations on a large repository is surprisingly expensive.

By default my server logs don't have user agents shown, so I checked some of the IPs. They were mostly Amazon and Meta IPs, but there were too many to block individually. Once I enabled user agent headers, the offenders were clear.

Leave a Comment