Page MenuHomePhabricator

DBQueryErrors when trying to create Wikidata Items
Closed, DuplicatePublicPRODUCTION ERROR

Description

@Zeroth reported via IRC that he got several exceptions like this when trying to create an Item on Wikidata with Special:NewItem...

[XEorOQpAICoAAKjk4r8AAAAQ] 2019-01-24 21:16:57: "Wikimedia\Rdbms\DBQueryError"

In a last attempt he said he managed to create the Item. This should be investigated.

Event Timeline

jcrespo moved this task from Triage to Blocked external/Not db team on the DBA board.
jcrespo added subscribers: Ladsgroup, jcrespo.

Sorry you suffered this issues. I can see a few hundred Wikibase\UpsertSqlIdGenerator::upsertId errors at that time.

In particular to:

INSERT INTO `wb_id_counters` (id_type,id_value) VALUES ('wikibase-item','1') ON DUPLICATE KEY UPDATE id_value = LAST_INSERT_ID(id_value + 1)

I will send this information to wikidata team and CC @Ladsgroup , as that count could be a contention point. However the error didn't repeat itself in the next 17 hours, and corrected itself after a few minutes, so maybe it was just the typical bot going out of hand creating new items and not leaving anyones else resources to do the same (something that it is common on Wikidata). It could also be related to a temporary issue with the new version deployment: https://wikitech.wikimedia.org/w/index.php?title=Deployments&oldid=1814619#deploycal-item-20190124T2000

I can see an increase activity on enwiki, and notification messages. I can also see that the automatic overload checkers kicked in and solved the issue automatically in a few minutes, so, - in a way - something was already done to "fix" it (the query killer takes care of bad database states).

The edit rate not being affected means this was a probably relatively localized problem https://grafana.wikimedia.org/d/000000208/edit-count?orgId=1&from=1548357720872&to=1548374190181 and not something that happens regularly.

mmodell changed the subtype of this task from "Task" to "Production Error".Aug 28 2019, 11:07 PM