Handling loss of data access due to server downtime

On 28th and 29th of September 2007, P.C. College of Engineering had organized a technical event called ‘Blitzkrieg 2007‘. I was involved in creating the script to allow users to register themselves as participants for various competitions. This simple script had two responsibilities.

  • Registration of participants
  • Listing of all participants

The script was pretty simple and worked fine till the day of event. Organizers were able to view all participants who had registered for competitions. However, during the day of event (28th September 2007), organizers faced a problem that we had not at all considered. The hosting plan for Blitzkrieg website had provided them with small bandwidth. Due to this, the allocated bandwidth got over on the day of event and organizers were unable to view the site and get participant’s list.I had never experienced such a problem before. Was it possible for me to write a script in such a way to handle this situation? It was definitely not possible to increase the bandwidth using a PHP script, but yes, there was a trick that would have helped organizers to access the latest data.Before understanding this hacky solution, let’s understand what the actual script used to do:

  1. Display a registration form to the user
  2. Get the data provided by user and validate it
  3. If the data was valid, then store the data and send a mail to registered user (participant), informing him about successful registration.

Here, we would have added an extra step to send a mail to organizers after every successful registration with corresponding sql (insert or update sql). This would have given organizers a list of sql commands which if they could have executed on local database. This would have provided them with local access to list of participants even in case of bandwidth failure on central server.

This solution is just a precautionary measure to handle such kind of situations. It has to be implemented before the problem occurs. In our case, we had to call the customer support of our web-host who acted quickly and increased the bandwidth, allowing organizers to view the list of participants.


  1. How much bandwidth did your host provide per month ? How much of it was remaining on the day of the event ? I think you’ll underestimated the number of visitors to the site.

  2. You know, you could have simply accessed the site’s control panel and used phpmyadmin to view the database.

    If hundreds of students had registered it would be a daunting task to re-construct the database from the hundreds of resulting e-mails. You were right in calling it a hacky solution, this is not the kind of solution one would expect from an engineering graduate with work experience!

    Keep writing!

  3. Hi Anony,

    Thanks for the comment. The fact was that it was not even allowing us to connect to control panel. So, all these problems happened. The solution mentioned here is just to show that we need to make sure that we do implement some sort of mechanism to handle unexpected loss of data in any commercial application.

    This solution is indeed not feasible if the data was in large quantities. The event was not a large scale event and participants were expected to be around 25-30.

    In developing large scale enterprise applications, we need to implement more sophisticated backup mechanism. I’ll definitely write about them in future.

    Thanks again for your comment.

Speak Your Mind