showYourHits

The showMyHits screens are currently giving incorrect results. The reason behind this is that as the site grows more information is added to the logfiles which means that showMyHits script has to parse significantly more with each passing month. Originally all statistics were going to be logged into the database, but that breaks our overall stats analysis programs, and generates tables with in excess of 3 million rows (already!) which the database really doesn’t like sorting through.

So, many of you may have noticed that showMyHits was getting slow. The really bad downside to it getting slow was that it also dragged the rest of the machine down with it. To give you some idea, the system can cope with somewhere around 30 or 40 people accessing and updating their diaries simultaneously and not really notice any slowdown… But get 2 people running showMyHits at the same time and that was all she wrote. The server load went through the roof and pages slowed down…. Can’t be having that now can we?

A compromise solution has been implemented, after emergency discussion between myself and Matt at the beginning of the week, we decided that the original logging system should remain so that the reports and stuff still worked, and that showMyHits would use a modified idea of the original to store in the database. The reason being that accesses to people’s diaries take up surprisingly few log lines, so the tables should stay relatively small.

As the need to get people off the old showMyHits system has become more imperative over the last few days, I decided this morning to implement the new method and switch to it immediately. This means that the hits counting has started from now. I was hoping to switch it in a weeks time so no-one would notice a ‘lack’ of hits… But it was grinding the box into the floor, so its changed. Apologies for the lack of data presently, it is now counting and normal, meaningful stats will begin to count up…

An improved side effect of the change is that hostnames are now available in your showMyHits listing again, instead of just the IP addresses!! Woohoo.

For those that are interested in the reasons why accessing peoples diaries takes up relatively little log space, the answer is in the graphics… Registering an access to your diary takes one row in the table. But to register ALL activity that results in the pleasant page your viewer is seeing can take considerably more. This is because a log line is generated for every single image that is downloaded too. So with the new button bar, thats 6 lines, plus the diarylogo, plus the (potentially) 4 navigation buttons and maybe 3 or four backgrounds too, depending on how your diary is customized. Suddenly that one access to your diary has resulted in upwards of 12 log lines for the server to parse!!

Hopefully this answers the questions of why the showMyHits is showing weird information right now, and rest assured, it will recover the data over the course of the next week.

Steve.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *