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 🙂


2 Responses to “Apt-Cacher-NG”

  1. The solution is run squid in front. Use any redirector to redirect to apt-cacher from squid. You can follow this link : http://blog.pattu.thekkedam.com/2008/05/squid-cache-proxy-with-apt-cacher-for.html

    Hope this will help you

    • 2 evidex

      Thank you! Luckily, I’d managed to get it working, infact, I’d stumbled across your blog whilst I was doing so. It was a great help, thanks 🙂

%d bloggers like this: