XF 2.1 xf_search_index' is marked as crashed

slw

Member
I keep having this index crashing and then having to rebuild the index.
running Xenforo 2.1.1
This started happening about a month ago

XF\Db\Exception: MySQL statement prepare error [144]: Table '/xf_search_index' is marked as crashed and last (automatic?) repair failed in src/XF/Db/AbstractStatement.php at line 217
  1. XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
  2. XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 40
  3. XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
  4. XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
  5. XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 222
  6. XF\Db\AbstractAdapter->insert() in src/XF/Search/Source/MySqlFt.php at line 97
  7. XF\Search\Source\MySqlFt->index() in src/XF/Search/Search.php at line 40
  8. XF\Search\Search->index() in src/XF/Behavior/Indexable.php at line 46
  9. XF\Behavior\Indexable->XF\Behavior\{closure}() in src/XF.php at line 290
  10. XF::triggerRunOnce() in src/XF/Mvc/Dispatcher.php at line 143
  11. XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
  12. XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2177
  13. XF\App->run() in src/XF.php at line 390
  14. XF::runApp() in index.php at line 20
 
i`m getting this error

Oops! We ran into some problems.
XF\Db\Exception: MySQL statement prepare error [145]: Table '/xf_search_index' is marked as crashed and should be repaired in src/XF/Db/AbstractStatement.php at line 217

XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 39
XF\Db\Mysqli\Statement->prepare() in src/XF/Db/Mysqli/Statement.php at line 54
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 289
XF\Db\AbstractAdapter->delete() in src/XF/Search/Source/MySqlFt.php at line 126
XF\Search\Source\MySqlFt->delete() in src/XF/Search/Search.php at line 122
XF\Search\Search->delete() in src/XF/Behavior/Indexable.php at line 81
XF\Behavior\Indexable->XF\Behavior\{closure}() in src/XF.php at line 290
XF::triggerRunOnce() in src/XF/Mvc/Dispatcher.php at line 143
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 50
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2178
XF\App->run() in src/XF.php at line 390
XF::runApp() in index.php at line 20


am having the same problem whenever users create thread its automatically created 3/4 threads and I can't delete users thread and getting this error.

how to fix it
 
Hi guys,

I am having a similar issue.

I tried to rebuild the search indexes but right at the end I get this error:

XF\Db\Exception: MySQL query error [1366]: Incorrect string value: '\xF0\x9F\xA6\xB8\xE2\x80...' for column forum.xf_search_index.message at row 388 in src/XF/Db/AbstractStatement.php at line 228

XF\Db\AbstractStatement->getException() in src/XF/Db/Mysqli/Statement.php at line 196
XF\Db\Mysqli\Statement->getException() in src/XF/Db/Mysqli/Statement.php at line 77
XF\Db\Mysqli\Statement->execute() in src/XF/Db/AbstractAdapter.php at line 94
XF\Db\AbstractAdapter->query() in src/XF/Db/AbstractAdapter.php at line 274
XF\Db\AbstractAdapter->insertBulk() in src/XF/Search/Source/MySqlFt.php at line 107
XF\Search\Source\MySqlFt->flushBulkIndexing() in src/XF/Search/Source/AbstractSource.php at line 53
XF\Search\Source\AbstractSource->disableBulkIndexing() in src/XF/Search/Search.php at line 98
XF\Search\Search->disableBulkIndexing() in src/XF/Search/Search.php at line 62
XF\Search\Search->indexEntities() in src/XF/Search/Search.php at line 85
XF\Search\Search->indexRange() in src/XF/Job/SearchRebuild.php at line 57
XF\Job\SearchRebuild->run() in src/XF/Job/Manager.php at line 253
XF\Job\Manager->runJobInternal() in src/XF/Job/Manager.php at line 195
XF\Job\Manager->runJobEntry() in src/XF/Job/Manager.php at line 111
XF\Job\Manager->runByIds() in src/XF/Admin/Controller/Tools.php at line 120
XF\Admin\Controller\Tools->actionRunJob() in src/XF/Mvc/Dispatcher.php at line 350
XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 261
XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
XF\App->run() in src/XF.php at line 391
XF::runApp() in admin.php at line 13


Any suggestions appreciated, thanks
 
easiest thing to do is to log in to phpmyadmin and run the repair command on the table.
if it's large, truncate it and then rebuild the search index

By truncate do you mean delete all the entries and start over from scratch?

I tried the rebuild command in the Admin CP and that crashed. My hosting provider updated the MySQL on the server today and I started getting this problem.
 
I truncated search index table from database and downgraded my php version from 7.4 to 7.2. the system is working stable. there is no error.
I'm using Xenforo1.5.4

Thanks for replies. (y)
 
Back
Top Bottom