The webcam image at webcam.idefix.net is ... / 2014-02-06

2014-02-06 The webcam image at webcam.idefix.net is ...
The webcam image at webcam.idefix.net is getting popular at the moment due to the use by nedWeer.nl peaking at 0.5 requests/second.

Since the image is imported from a different server in a proxying setup this was causing quite some traffic on my adsl line. The image doesn't update every second, so I had a look into caching possibilities with apache 2.2. I wanted to use the memory cache for just this one object but I started with the disk cache because it's easier to debug and see the files on disk. This didn't work, and I could not figure out why. I followed the instructions found in apache2 - Apache Reverse Caching Proxy - why isn't it caching? - stackoverflow.com but still no caching happening.

I set up a separate virtual server with the logging set to level 'debug' and found the following interesting line in the log:
[Thu Feb 06 16:24:59 2014] [debug] mod_cache.c(370): (12)Cannot allocate memory: cache: Cache provider's store_body failed!
This looked more like a memory cache problem than a disk cache problem. But the memory cache wasn't configured at all. I decided to remove the memory cache support completely and that fixed things with the disk cache. The debug log suddenly had the right messages:
[Thu Feb 06 16:25:59 2014] [debug] mod_cache.c(633): cache: Caching url: /camwindow.jpg
Now the webcam image is cached for 120 seconds. Which saves some traffic on the ADSL line.

Update 2013-02-10: Requests still going at about 0.5 requests/second at busier times. The proxy reduces the impact on ADSL traffic and ping delays.

Tags: , ,

IPv6 check

Running test...
, reachable as koos+website@idefix.net. PGP encrypted e-mail preferred. PGP key 5BA9 368B E6F3 34E4 local copy PGP key 5BA9 368B E6F3 34E4 via keyservers

RSS
Meningen zijn die van mezelf, wat ik schrijf is beschermd door auteursrecht. Sommige publicaties bevatten een expliciete vermelding dat ze ongevraagd gedeeld mogen worden.
My opinions are my own, what I write is protected by copyrights. Some publications contain an explicit license statement which allows sharing without asking permission.
Other webprojects: Camp Wireless, wireless Internet access at campsites, The Virtual Bookcase, book reviews
This page generated by $Id: newsitem.cgi,v 1.55 2021/11/09 13:09:49 koos Exp $ in 0.005702 seconds.