Press play on tape

August 22nd, 2011

Press play on tapeThe files containing the code have now been transferred to the new server. Up next are the image folders. Then it’s time for the database. Progress…

Change of plans!

August 22nd, 2011

The old server is really struggling. The MySQL database server is crashing like there’s no tomorrow and everything’s more or less horrible. So there’s a change of plan. Originally I was going to do a lot of work on the site on the new server before moving the database over; fixing things, optimizing stuff and rewriting a bunch of sloppy code. That will take time and with the old server having more and more problems we’re really running out of time. The new plan is to move the site as it is – and that work will start later tonight.

In a few hours time I will shut down the member functions in order to freeze the database before the move. This basically means that you won’t be able to log in and submit any data or stuff – but it’s kind of hard to do that anyway when the server’s going down every minute. I will then transfer the code and all the files to the new server and work on getting it running there. Once it seems to be running I’ll point the DNS entries to the new server and hopefully things should go better from there. I have no idea of the time frame on this but I’ll try to get it done during the night.

New server status update #5

August 19th, 2011

server upgradeAll of Driver Database’s blogs (driver blogs, news and updates) have now been running for a few days on the new server. After a little boost in the memory department they’ve been running reliably as well. The speed is quite decent and at this point I see no need for more memory or more CPU cores for this server (to keep costs down, of course).

The second new server has been set up and it’s the one that will host the main site. All focus will now go to optimizing the main site on the new server. I’ll rerwite a whole lot of the code as it’s rather sloppy in some places and will try to make it as quick as possible to give it the best conditions possible in its new home. :)

More to come!

New server status update #4

August 15th, 2011

LinuxThe updates and driver blogs have now been running on the new server for a few days. During the night the server refused to co-operate and I had to reboot it. Looking at the logs it appeared to have ran out of memory. One of the upsides of being on a cloud server is that there’s no need to physically add more RAM to the server so after a few clicks of the mouse I added another 512 MB RAM to the system.

Will monitor it closely to see if that’s enough. I think it ought to be, unless there’s a memory leak somewhere.

On another note I guess you may have seen that we suffered some data loss last Thursday. While trying to optimize a slow database table it in some weird way imploded and delete two thirds of the data. Not what I have intended, eventhough it did speed up things. ;)

The latest backup (which was four days old) was in place a few hours later and I spent all of Friday reconstructing lost connections in the database. We lost a few championship points and positions as well as team info that was added in the last couple of days but fortunately there was no major harm done.

Next up is to move the news.driverdb.com blog to the new server – hopefully without having to upgrade RAM again.

New server status update #3

August 11th, 2011

the speeeeedAll the driver blogs are now located on the new server and are therefor way faster than on the old server. There should also be a bit less load for the main site that is still located on the old server (that move is a bit more complicated).

In the coming weeks I’ll open up the driver blogs for new registrations again – something which I removed over a year ago due to the extreme amounts of spam bloggers signing up (I had over 2000 spam blogs signed up in less than a week). Got a new anti-splog plugin that hopefully will take care of things.

Now work will continue on making the fastest Driver Database ever seen (shouldn’t be too hard, right?) on the new server. There will be some layout changes as well…

New server status update #2

August 9th, 2011

If you can read this message it means that the DNS changes have come into effect and updates.driverdb.com is actually located on the new cloud server. The plan next is to move the driver blogs over to the new server and in step three move the news blog as well. There are two reasons I’m moving the blogs first:

  1. It’s much easier and quicker to migrate them.
  2. Having the blogs on the new server will take some load off the main site (which is still struggling on the old hardware) and therefor hopefully make the main site cope a bit better until I’m ready for the big move.

Since WordPress blogs – and especially WordPress MU – can be quite resource heavy I decided to actually use two cloud servers instead of the original plans to use just one. The server that this blog now resides on will be dedicated to the three blogs (updates, news and driver blogs) while a second server will deal with the main site.

New server status update #1

July 5th, 2011

It’s been a good while since I announced that I was looking to move Driver Database to a cloud server. Lots of things got in my way since then though and the site has been stuck on it’s old server, going slower and slower as the visitor numbers keep getting bigger.

Last month I decided it was time to start the work on the move. I haven’t really been into Linux since the late nineties so getting from a clean install to something in the regions of the current setup was trial and error hell but now everything on the server side is set up and migration of the code has begun.

There a lots of pages on Driver Database that load slowly, not just because of the current server that is not quite coping but also because of lots of database queries that when the database is as huge as it is and when there is much load on the server takes too long to process. As most of these queries are being repeated lots of time the answer is to cache them so they don’t have to go through the database server unless changes have been made. Caching is already in place on some pages (the driver overview page, for example) but there are lots of places where it’s needed.

Therefor I’ve decided not to just move the current code to the new server but to go through every part of the code to try and optimize it as much as possible. I’ll also make a few much needed changes to a couple of things. More on that later…

Driver Database Prediction League

March 10th, 2011

Prediction LeagueI’ve toyed with the idea of setting up a prediction league for quite a while. Yesterday I decided to take action and today I’ve got about 50% of the code done. It was also an exercisein Facebook for Websites, which turned out to be extremely simple and quick to get to grips with. In short it means that the Prediction League will be limited to the people with a Facebook account, like it or not.

The Prediction League will not be too complicated. Before the weekend you submit what you think will be the top six finishing positions in all or just your favourite championships. After the weekend the results will be compiled and you will score points for getting stuff right. There will be separate leaderboards for the different championships but also an overall leaderboard for those who know a lot about everything.

There will be space for 13 different championships. I’ve made a suggestion of predicting the results for the following:

Formula 1, NASCAR Sprint Cup, NASCAR Nationwide, IndyCar Series, GP2, GP3, Formula Two, F3 Euro Series, World Series by Renault, Formula Renault 2.0 Eurocup, DTM, WTCC and Indy Lights.

If you want to take part in the Prediction League and have other suggestions for covered championships, please leave a comment in this blog post.

So, what about prizes? Well, I’m not expecting a massive turnout of players in the thousands so I guess it will be difficult to get anyone to sponsor with prizes. Perhaps I can sort something out for the overall winner – but basically you will be competing for bragging rights, unless there are some nice new developments.

Once the code is in place I will start up a small opening series that will run for just one weekend so that we can test things out live before we start it for real. I’ll let everyone know when you can sign up. :)

The November surprise

November 11th, 2010

November 1st had a big surprise on offer. I was working through some of the data entry cue, minding my own business, when the surprise came along. All of a sudden I got logged out. A bit weird I thought and tried to log in again. But I couldn’t. Something had happened. Extremely odd. My first thought was that something in the database had been corrupt, perhaps a table had imploded or something. I logged in to the MySQL database only to find nothing out of the ordinary. Perhaps a file was corrupt? It would be strange, but it was a strange error, so it was worth a shot. I re-uploaded some files and the problem was still there.

I then went into the log in code to start so debugging, which I thought was really not necessary as I hadn’t done any changes to that piece of code in over a year. Why should it suddenly stop working after all this time? I tracked down the error and when I saw where it kicked in I came to a conclusion. And, I was right.

On November 1st my hosting company decided to upgrade PHP to the latest version, without asking me or even letting me know. I wasn’t happy. Sure, it’s good to have the latest version and it’s been in my plans to upgrade – but I would much rather do it in my own time and make the deciscion myself. The code is pretty much compatible but I’ve done a lot of changes and tweaks to the PHP settings over the years, which were all wiped with this new install.

I got the log in functions working again quickly but it was then I realised that there were probably more things broken than there were things working… during the six years of Driver Database the source code for the website has been growing huge so it’s not been fun to go through most of it looking for things not functioning properly and also trying to think of what changes I had done to the PHP settings five or so years ago.

So that’s what I’ve been doing until today. The final piece of the puzzle was the blog feeds on the front page which totally gave up on November 1st. For this I used a third-party script which was obviously not very compatible with PHP5. So I ended up doing my own solution for it.

I think it’s all working the way it did in October now…

So now I can continue with all the work I really had planned to do.

Albin adds a feature

October 25th, 2010

My son Albin, who’s now one year and four months, has had a feature request. Well, he hasn’t really been aware of the request, but the solution saves him from getting fed up.

Albin likes the Driver Datbase photo gallery as he’s really into looking at race cars (and making sound effects to them). The problem is he thinks it takes too long with loading the gallery, selectiong a photo, then going back to the gallery to select another photo. Patience is not something he’s been blessed with.

So, from now on, there’s a little icon of a die down to the right of every racing photo. One click on that icon takes you to another photo, selected at random.

Perhaps not the most important feature ever added to the website, but it sure is in the top five. ;)