Many of our clients are large companies that choose to host their websites in-house. They do this because of security and data confidentiality concerns. This is standard practice in large companies but it usually suffers from the following drawbacks:
- In most cases, the in-house data center infrastructure is not at par with standard hosting infrastructures.
-
The procedures in most of these in-house data centers are either very loose or do not exist: There are no formal backup/emergency plans, no alternative power in case of a power failure, no alternative Internet route in case of the failure of the main route, etc…
-
The staff managing these in-house data centers is not fully qualified and/or not enough to handle this task.
Of course, with time, an in-house data center can become very stable – but this usually happens after many years and after many technical catastrophes. A very common technical catastrophe that happens on private data centers is caused by a power outage. Unfortunately, that’s what happened to one of our clients this Monday (2 days ago).
Naturally, our client’s Joomla website went immediately down during the power outage, but even after power had been restored and all the servers were up, the website remained down. The website was displaying a blank page.
After some heavy and swift analysis, we discovered that the website remained down because of the following reasons:
- The boot sequence was wrong
In many cases, the boot sequence matters. The boot sequence means the order by which the servers should start. For example, the file server should always start first, then the database server, and finally the application server. Wrong boot sequences either make the application server completely inoperable (which means that all the websites will remain down) or, at the very least, affect certain functionalities at the application server level.
So, how did we fix the problem?
It was easy, we only had to alert the networking department of that company of the wrong boot sequence. They took care of the rest!
-
The MySQL Server did not start automatically
Normally, the MySQL Server starts automatically when the server is started – but – for some reason, the MySQL server did not start automatically after the team did the right boot sequence.
So, what did we do to fix the problem?
To fix the problem, we only needed to start the MySQL server manually. MySQL can be started manually by issuing the following command on the shell of the server hosting MySQL:
/etc/init.d/mysqld start
(Note: The above command may not work for you if you’re using a different flavor of Linux than the one that our customer is using.)
-
The #__session table became corrupt
Table corruption usually happens when there’s an attempted write to that table, but the write fails for one of the following reasons:
- Loss of power
- MySQL server force shutdown
- Sudden loss of connectivity between the application server and the database server (if these servers reside on different physical servers).
- Other reasons…
Now, every time you load a page on a Joomla website, Joomla writes to the #__session table – that’s why it was natural for the #__session table to become corrupt. Note that it’s possible to have other tables corrupt as well in case there are attempted writes to these tables when the power outage happens, but, in our scenario, the problem just happened on the #__session table.
So, what did we do to solve this problem?
Well, it was easy. All that we needed to do was to login to phpMyAdmin and issue the REPAIR command on the #__session table. In other words, we ran the following query (after clicking on the name of the database, and then clicking on the SQL link on the top):
REPAIR TABLE #__session
(Note: You should replace #__ with your table prefix.)
Now, in case you’re completely unlucky, your whole database may have become corrupt because of the outage. In this case, we suggest you take a look at our post: How to salvage your Joomla website.
If your Joomla website stopped working after a power outage, then please follow the above guide. If it doesn’t work for you, then don’t be shy – contact us. Our rates are super affordable, our work is clean and professional, and we won’t rest until your Joomla website is up and running again!