Page MenuHomePhabricator

"LinksUpdate::incrTableUpdate". Database returned error "1205: Lock wait timeout exceeded; try restarting transaction" on Commons
Closed, DeclinedPublic

Description

"LinksUpdate::incrTableUpdate". Database returned error "1205: Lock wait timeout exceeded; try restarting transaction

Did try and fix this in 485799, but it seemed to cause others issues. Reverted in r85812


Version: 1.17.x
Severity: normal

Details

Reference
bz28498

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:24 PM
bzimport set Reference to bz28498.
bzimport added a subscriber: Unknown Object (MLST).

what "other issues" ?

Both r85799 's CR and r85812 commit message don't say a lot ;-)

(In reply to comment #1)

what "other issues" ?

Both r85799 's CR and r85812 commit message don't say a lot ;-)

It made the errors occur more frequently for some people

With http://wiki.openstreetmap.org/w/index.php?title=Category%3AEn&diff=863065&oldid=863024 I got Database error:
[...] richiamata dalla funzione "LinksUpdate::incrTableUpdate". Il database ha restituito il seguente errore "1213: Deadlock found when trying to get lock; try restarting transaction (localhost)".

(In reply to comment #3)

With
<http://wiki.openstreetmap.org/w/index.
php?title=Category%3AEn&diff=863065&oldid=863024>
I got Database error:
[...] richiamata dalla funzione "LinksUpdate::incrTableUpdate". Il database
ha
restituito il seguente errore "1213: Deadlock found when trying to get lock;
try restarting transaction (localhost)".

I only get:
"2 revisions of this difference (863024 and 863065) were not found.
This is usually caused by following an outdated diff link to a page that has been deleted. Details can be found in the deletion log."

Yes, sorry, the error was on saving and not on displaying, the diff just for the records. Only sysops can see it now.

Seems rare now:

aaron@fluorine:~/mw-log$ zgrep --no-filename Deadlock archive/dberror.log-201405* | grep -P '(?<=\s)[a-zA-Z\\:]+::[\w:]+(\s+\([^)]+\))?(?=\s)' -o | sort | uniq -c | sort -rn -k 1

1602 RecentChange::save
 762 MessageGroupStats::forItemInternal
 553 LocalFile::recordUpload2
 359 User::saveOptions
 143 MessageGroupStats::clear
  33 Title::invalidateCache
  31 WikiPage::updateCategoryCounts
  31 LocalFileRestoreBatch::execute
  19 SqlDataUpdate::invalidatePages
  11 FRDependencyUpdate::doUpdate
   8 LocalFileMoveBatch::doDBUpdates
   8 LocalFile::lock
   6 WikiPage::pageData
   6 Block::insert
   5 WikiPage::doDeleteArticleReal
   5 GlobalUsage::insertLinks
   5 GlobalUsage::copyLocalImagelinks
   5 Category::refreshCounts
   3 HTMLCacheUpdateJob::invalidateTitles
   3 FRPageConfig::setStabilitySettings
   2 WatchedItem::addWatch
   2 Title::moveToInternal
   2 LinksUpdate::incrTableUpdate
   2 LinksDeletionUpdate::doUpdate
   2 DatabaseMessageIndex::store
   2 Block::updateTimestamp
   1 WikiPage::updateRevisionOn
   1 WikiPage::insertRedirectEntry
   1 WikiPage::commitRollback
   1 WatchedItem::removeWatch
   1 MWDbEchoBackend::createNotification
   1 LinksUpdate::updateLinksTimestamp
   1 FRUserCounters::saveUserParams
   1 FlaggableWikiPage::updateStableVersion
   1 FlaggableWikiPage::updatePendingList
   1 ChangeTags::addTags

This has increased lately, also for Commons:

https://logstash.wikimedia.org/#dashboard/temp/AVBHn2aKptxhN1XactTz

Not reopening yet because:

a) It has only happened for 2 days, it could be a very specific, temporary traffic issue
b) It could be minimized by tuning some mysql parameters
c) it is not causing production issues, but it makes these jobs fail several times after wasting time blocked.