Last night, when trying to install Crunchbang with the alternate script onto Jaunty86, which is a story for another blog, I set it up to grab some old packages from the server, which runs apt-cacher to cache .deb packages. Great, updates went fast.
But then stopped. I tried to log in to the server, and could not, and the screen was inaccessible. A hard reboot and investigation of the logs reveals that the server ran out of memory, and that it was caused by apt-cacher. I couldn’t believe it. I knew I had a big cache, ~2Gb. but I didn’t think that would be a problem. But no, with htop at hand I ran the update again, and watched in horror as apt-cacher opened its hungry mouth and swallowed 90% of my RAM in one big gulp, and proceeded to eat into the swap. Something had to be done.
I decided to try apt-cacher-ng, and did so in such a bad way, working on pure gut, which needless to say made a simple process long and stressful. There was no need like 😦
Eventually, I got apt-cacher-ng running, and imported most of my old packages into it (that was the hardest bit). It runs much quicker, and lighter on RAM, so its FTW in my books.
My one problem now is trying to get Squid and Apt-Cacher-NG to play nice together. Apt-Cacher-NG unfortunately does not have the option to forward requests to the wrong type to a different proxy 😦 So I’m trying to use redirect scripts on Squid with Jesred, but am having issues getting it to re-direct just the packages and not the indexes. Why doesn’t it just let me forward the unknown requests to Squid? 😦
If anyone with any experience using Jesred happens to stumble across this, please, leave a comment, this is wrecking my head. 😦 If I get it all set up, I’ll write a proper tutorial 🙂
Filed under: Server, Ubuntu | 2 Comments
Tags: Apt-Cacher, Apt-Cacher-NG, Jesred, Server, Squid, Ubuntu