Error : The following exception has occurred: API failure: DBD::mysql::db selectall_arrayref failed: Table is marked as crashed and should be repaired.

Sometimes website start displaying error as follows:

jtablesession::Store Failed
DB function failed with error number 145
Table ‘./stuffabo_jo151/jos_session’ is marked as crashed and should be repaired SQL=INSERT INTO `jos_session` ( `session_id`,`time`,`username`,`gid`,`guest`,`client_id` ) VALUES ( ‘55194ad14a496478f5b74592387b2680′,’1278058254′,”,’0′,’1′,’0′ )

If you receive such error just try to repair the database related to the site.

Login to  your cPanel >> Databases >> phpMyAdmin

Choose the affected database from the available list.

In the main panel, you should see a list of your database tables. Check the boxes by the tables that need repair.

At the bottom of the window just below the list of tables, there is a drop down menu. Choose “Repair Table

Also you can do a repairing through  cPanel if you are not phpmyadmin friendly.

Go to cPanel >> Databases >> Mysql Databases

In Modify Databases section you can find Repair DB drop down.

Select Appropriate DB and click repair.

The database is repaired and the site is back to normal.

Sometimes we need to add a file with specific file size,For this you can check:create a file with specific size