Error when trying to save page contents and metadata


(Nic Hubbard) #1

Matrix Version: 5.4.3.1

We recently had our Azure instance have issues and we are now getting errors when trying to save page contents or metadata:

Fatal error: Uncaught exception 'Exception' with message: 'Unable to add indexable content due to database error: SQLSTATE[XX001]: Data corrupted: 7 ERROR: invalid page in block 43806 of relation base/31619/32080' in [SYSTEM_ROOT]/packages/search/search_manager/search_manager.inc(958): Search_Manager->addIndexableContent('208856...', Array)
#1 [SYSTEM_ROOT]/packages/search/search_manager/search_manager.inc(174): Search_Manager->reindexAsset(Object(Bodycopy_Div #208856), Array)
#2 [SYSTEM_ROOT]/core/include/event_manager.inc(345): Search_Manager->onAssetUpdate(Object(Bodycopy_Div #208856), Array)
#3 [SYSTEM_ROOT]/core/include/asset.inc(1590): Event_Manager->broadcastEvent(Object(Bodycopy_Div #208856), 'AssetUpdate', Array)
#4 [SYSTEM_ROOT]/core/include/asset.inc(1741): Asset->_updated(false)
#5 [SYSTEM_ROOT]/core/include/asset.inc(1576): Asset->incrementVersion('micro', true)
#6 [SYSTEM_ROOT]/core/include/asset.inc(3656): Asset->_updated()
#7 [SYSTEM_ROOT]/core/assets/content_type/content_type.inc(212): Asset->saveAttributes(false)
#8 [SYSTEM_ROOT]/core/assets/bodycopy/bodycopy_containers/bodycopy_div/bodycopy_div_edit_fns.inc(824): Content_Type->saveAttributes()
#9 [SYSTEM_ROOT]/core/assets/bodycopy/bodycopy/bodycopy_edit_fns.inc(456): Bodycopy_Div_Edit_Fns->processContainer(Object(Bodycopy_Div #208856), Object(Backend_Outputter), 'bodycopy_167986', '', '', Array, Array)
#10 [SYSTEM_ROOT]/core/include/asset_edit_interface.inc(2476): Bodycopy_Edit_Fns->processBodycopy(Object(Bodycopy #167986), Object(Backend_Outputter), 'bodycopy_167986')
#11 [SYSTEM_ROOT]/core/include/asset_edit_interface.inc(2210): Asset_Edit_Interface->processInline(Object(Bodycopy #167986), Object(Backend_Outputter), false, 'contents')
#12 [SYSTEM_ROOT]/core/include/asset.inc(6410): Asset_Edit_Interface->process(Object(Bodycopy #167986), Object(Backend_Outputter), false)
#13 [SYSTEM_ROOT]/core/include/asset_manager_edit_fns.inc(218): Asset->processBackend(Object(Backend_Outputter), Array)
#14 [SYSTEM_ROOT]/core/include/asset_manager.inc(9875): Asset_Manager_Edit_Fns->paintBackend()
#15 [SYSTEM_ROOT]/core/include/backend.inc(1812): Asset_Manager->paintBackend(Object(Backend))
#16 [SYSTEM_ROOT]/core/include/backend.inc(236): Backend->_printMain()
#17 [SYSTEM_ROOT]/core/include/mysource.inc(624): Backend->paint()
#18 [SYSTEM_ROOT]/core/web/index.php(30): MySource->start()

Anything we can do about this?


(Nic Hubbard) #2

Turning off the Search Manager fixes the issue. But I assume there is reasons we need the search manager? We do use funnelback, so maybe we don’t need it turned on?


(David Schoen) #3

The error implies your Postgres instance has had some corruption. Repairing that is beyond my knowledge, but you may be able to determine if only your sq_sch_idx table is broken or whether other tables are also corrupted by following something like https://www.disk91.com/2023/technology/systems/fix-postgresql-data-corruption-invalid-page-in-block-of-relation-base-16384/ .

Depending on the scope and whether the simple reindex/vacuum fix suggested there works, you may need to restore from backup.

The sq_sch_idx table is only used by the Search Manager. The Search Manager uses it when doing a quick search in the backend for content (i.e not an asset id or URL) and any Matrix search assets on the frontend.


(Nic Hubbard) #4

Thanks David. We ended up restoring from a backup and all is good again.