Lucas_Werkmeister_WMDE added a comment.
In T309445#8028484 <https://phabricator.wikimedia.org/T309445#8028484>, @Lucas_Werkmeister_WMDE wrote: > …and while working on adding the logging, I suddenly find this: > > name=ItemTermStoreWriterAdapter::saveTermsOfEntity() > if ( $entity instanceof Item ) { > try { > $this->store->storeTerms( $entity->getId(), $entity->getFingerprint() ); > return true; > } catch ( TermStoreException $ex ) { > return false; > } > } > > Small wonder there’s no trace of errors in Logstash… This turns out to be a red herring, there’s no code that actually throws this exception type. However, we can now see **uncaught exceptions** in logstash – they get logged to the normal mediawiki-errors board as well, we just didn’t find them before because they don’t include the item ID anywhere in the request URL or stack trace. These seem to happen in bursts – for example, 45 of them all between 5:19 and 5:26 AM today F35289127: image.png <https://phabricator.wikimedia.org/F35289127> – and the error seems to be consistent: Error 1205: Lock wait timeout exceeded; try restarting transaction Function: Wikibase\Lib\Store\Sql\Terms\DatabaseTermStoreWriterBase::acquireAndInsertTerms Query: SELECT wbit_term_in_lang_id AS `value` FROM `wbt_item_terms` WHERE wbit_item_id = 41443421 FOR UPDATE This can happen – I think we need to wrap the deferred update in a try/catch block and reschedule the update as a job if it fails. (And then rethrow the exception, so MediaWiki knows there was a DB error.) I guess when we wrote this code we might have assumed that MediaWiki did this automatically? (We might also reconsider if the `FOR UPDATE` there is necessary, but I think that would be a larger project to change.) TASK DETAIL https://phabricator.wikimedia.org/T309445 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Lucas_Werkmeister_WMDE Cc: Lydia_Pintscher, karapayneWMDE, Addshore, Manuel, Lucas_Werkmeister_WMDE, Aklapper, Moebeus, Astuthiodit_1, Invadibot, maantietaja, ItamarWMDE, Akuckartz, Nandana, lucamauri, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org