Discussion in 'Troubleshooting and Problems' started by click here, Jun 9, 2016.
My index xf_thread is corrupted
What is the best course of action?
Is there a specific error on a certain action which indicates corruption?
several hundred errors
Zend_Db_Statement_Mysqli_Exception: Mysqli statement execute error : Index xf_thread is corrupted - library/Zend/Db/Statement/Mysqli.php:214
#0 /forums/library/Zend/Db/Statement.php(297): Zend_Db_Statement_Mysqli->_execute(Array)
#1 /forums/library/Zend/Db/Adapter/Abstract.php(479): Zend_Db_Statement->execute(Array)
#2 /forums/library/Zend/Db/Adapter/Abstract.php(753): Zend_Db_Adapter_Abstract->query('\n\t\t\tSELECT thre...', Array)
#3 /forums/library/XenForo/Model/Thread.php(48): Zend_Db_Adapter_Abstract->fetchRow('\n\t\t\tSELECT thre...', 318136)
#4 /forums/library/XenForo/ControllerHelper/ForumThreadPost.php(154): XenForo_Model_Thread->getThreadById(318136, Array)
#5 /forums/library/XenForo/ControllerHelper/ForumThreadPost.php(76): XenForo_ControllerHelper_ForumThreadPost->getThreadOrError(318136, Array)
#6 /forums/library/XenForo/ControllerPublic/Thread.php(32): XenForo_ControllerHelper_ForumThreadPost->assertThreadValidAndViewable(318136, Array, Array)
#7 /forums/library/Andy/Password/ControllerPublic/Thread.php(8): XenForo_ControllerPublic_Thread->actionIndex()
#8 /forums/library/XenForo/FrontController.php(351): Andy_Password_ControllerPublic_Thread->actionIndex()
#9 /forums/library/XenForo/FrontController.php(134): XenForo_FrontController->dispatch(Object(XenForo_RouteMatch))
#10 /forums/index.php(13): XenForo_FrontController->run()
My XF gallery is now corrup,
Do I just restore corrupted tables or the whole database?
@Chris D any ideas?
OPTIMIZE TABLE xf_thread;
This should force MySQL to rebuild the table.
I'd note that this is unrelated to the gallery. If you're suffering other index corruption, you can use their table names in that query, but you do need to identify why the corruption is happening or it may happen again.
OPTIMIZE TABLE xf_thread;
I just decided to restore the entire database... not sure why this happened but my host did move my db recently so maybe something happened in the move I don't know.
Restored database, now nothing but:
An unexpected database error occurred. Please try again later.
<!-- Mysqli prepare error: Table 'site_name.xf_data_registry' doesn't exist -->
It just keeps getting worse!
Hopefully my host will reply within the next 4 hours, so I can spend the time thinking about how much money I'm loosing.
That error means that a table is missing from the database. How big is your database and how did you back it up?
My database is 8.89 GB
I did the restore via the server admin panel at the request of my host as they said "If you do the restore from the panel you can actually keep the
old database in case you can salvage it!".
Right, but what about the backup that you restored, how it was made?
Can you go to you rphpmyadmin and check the database for the xf_data_registry table?
My host makes daily backups, have no idea how those are made.
About the only thing I could do is restore the table xf_data_registry by itself and see if that does anything?
The chances are that the database backup might be corrupted. Imo the best thing would be to check the backup file.
What about yourself, have you made any backups at all, or are you leaving that to your host to handle?
Your probably correct, I just went into phpmyadmin to look at the database and it wouldn't even come up, just got this error:
Error in processing request
Error code: 504
Error text: Gateway Time-out
I haven't made my own backups as I was leaving that to my host, that will change once this hopefully gets fixed.
I could try and restore to an older backup and see if that works, or backup the last one with the corrupted index and try to optimize that table. At this point it's been over 3 hours since I notified my host so not sure I should be doing anything as they may be working on it and we could be over writing each other.
Separate names with a comma.