Many times, due to heavy load the session table of Joomla crashes and the complete website goes down, it keeps giving a pathetic error:

Table './example/jos_session' is marked as crashed and should be repaired SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( 'hashcode_here','large_number_here','','0','1','0' )

In such u case you manually need to repair the database tables.

A SMART way of avoiding this is to automatically repair the tables as soon as such a crash is detected. Here is a step by step method to do it

-Open the file libraries/joomla/application/application.php
-Find the function checkSession()
-Find the code at line 1100:

// If the insert failed, exit the application.
if (!$db->execute())
{
jexit($db->getErrorMSG());
}

and replace it by

// If the insert failed, exit the application.
if (!$db->query()) {
$error_msg = $db->getErrorMSG();
$db->setQuery('REPAIR TABLE #__session'); //probably the session table is crashed, just repair automatically
$db->query();

jexit($error_msg);
}

See more at: http://network.convergenceservices.in/forum/40-joomla-tricks/3950-autmatically-repair-session-table-in-joomla-whenever-it-crashes.html