Now what?
You have a Joomla site that suddenly stops working. It happens. This is when that "free" open source concept can become expensive.
This is NOT just a Joomla issue. Any open source product can have DB 126 errors. Any CMS can produce a 500 Internal server error that, depending on your site, can generate plenty of anxiety. As of the date of this post, the link provided in the previous sentence had 234,000 results. This is not an uncommon error. What does 500 mean? Even the server doesn't know:
A generic error message, given when no more specific message is suitable .. . [more]
Here's what happens. You will start to search using the error message provided and quickly realize this message/these messages are not systemic to Joomla. Then you will go from forum to forum seeing posts from others asking the same question. Many of the threads will end with no resolution. Lots of dead-ends. You may even visit the myPHP site, leaving even more confused and anxiety filled knowing how many different ways an application can abend.
In this particular case, the 126 error, most indicators will point to a filled tmp drive. Here's why it's a tricky message. It will never say "out of disk space" instead it will tell you your query was not good and the perhaps you should repair some tables. We found one forum that said you need to repair, then optimize, then repair again to fix this. That, by the way, doesn't work.
The 126 error, in our case, was happening when using the article chooser from the backend. You would go to add a menu item, try to select the article and end up with a 500 error, a 126 message and a huge query string preceded by
Incorrect key file for table '/tmp/#sql_aa5_0.MYI'; try to repair it
Don't try to repair anything. (besides, what table(s) would you repair based on this message?)
Instead, make sure your tmp directory is plenty large IF your Joomla jos_content table is also large. Here's our new rule of thumb. Your tmp space needs to have at least 2x the size of your content. So if your jos_content is 500MB, you need at least 1GB available at the time you click that article chooser. (and if two admins are clicking at the same time, you'll need 2GB)
This part is a Joomla 1.5 flaw. The query behind the article chooser is horrible if you have a large quantity of articles. For most Joomla sites, this will never be an issue, but if you plan to use Joomla jos_content as a repository for long term storage, just make sure your tmp directory always has plenty of space.