One more caching problem

Cydex mentioned to me today:

dvl: /UPDATING and /MOVED don’t seem to be updating on FreshPorts

My response, ever so witty:

dvl: /UPDATING and /MOVED don’t seem to be updating on FreshPorts

I started comparing the production website with the one I run at home. The UPDATING pages differed. So did the MOVED pages.

I started looking at the cronjobs for each server. No, nothing stood out. Besides, these files are not updated through cronjobs. At one time they were, but no longer.

Then I started looking at the processing of each commit. FreshPorts records and logs each commit it processes. In the early days, this was a frequently used debugging tool. Today, it gets referenced very infrequently.

$ cd FreshPorts/freshports.org/msgs/FreeBSD/archive/2008_07/2008_07
$ grep -l 200807100241.m6A2fC39019708@repoman.freebsd.org *
2008.07.10.03.41.32.97472.txt.loading
2008.07.10.03.41.32.97472.txt.raw
2008.07.10.03.41.32.97472.txt.xml

200807100241.m6A2fC39019708@repoman.freebsd.org is the message id of a recent commit to UPDATING. The three files respectively contain:

  • the output of the processing
  • the raw email
  • the XML created from the raw email and used by FreshPorts for processing

OK, now what mentions of UPDATING do we see in that file?

$ grep UPDATING 2008.07.10.03.41.32.97472.txt.loading
MessageSubject = [cvs commit: ports UPDATING]
E’cvs commit: ports UPDATING’,
File = [Modify : ports/UPDATING : 1.665]
Observer has noticed that commit ‘200807100241.m6A2fC39019708@repoman.freebsd.org’ contains file ports/UPDATING as revision 1.665
applying special processing to ports/UPDATING
FILE ==: Modify, ports/UPDATING, 1.665, ports, UPDATING, 1120281
checking file ‘ports/UPDATING’ : element_id = ‘176987’
fetching $DESTDIR = [ports], $SRCDIR = [ports], $FILE = [UPDATING] $REVISION = [1.665]
about to fetch = ‘sh fetch-cvs-file.sh http://www.freebsd.org/cgi/cvsweb.cgi ports ports UPDATING 1.665 ” 2>&1’
processing ports/UPDATING

So… nothing thrilling. Just normal stuff.

Let’s see the content around that last line. That’s what we are really interested in. I visually compared it to the .loading file on my private development server. Same stuff. Nothing differed.

OK, so the problem is not in the processing. It must be elsewhere. Otherwise, why would my server show different webpages from the production server?

BINGO!

caching.

Let me clear out the cache on the production server:

rm cache/ports/UPDATING.PageSize

Problem fixed.

I am now 100% positive that the caching code is not catering for non-ports. I found similar problems with:

I will start looking at the cache processing soon.

Note that this is not a new problem. I have written about it before. I broke it. I will fix it.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top