Page MenuHomePhabricator

Various HTTP GET URLs must not throw DBReadOnlyError (due to MessageGroupStats)
Closed, ResolvedPublic

Description

{"id":"d3625818","type":"DBReadOnlyError","file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/db/Database.php","line":789,"message":"Database is read-only: MediaWiki is in read-only mode for maintenance. Please try again in 3 minutes","code":0,"url":"/wiki/

1{
2 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/db/Database.php",
3 "line":1463,
4 "function":"query",
5 "class":"DatabaseBase",
6 "type":"->",
7 "args":[
8 "string",
9 "string"
10 ]
11},
12{
13 "file":"/srv/mediawiki/php-1.27.0-wmf.16/extensions/Translate/utils/MessageGroupStats.php",
14 "line":474,
15 "function":"insert",
16 "class":"DatabaseBase",
17 "type":"->",
18 "args":[
19 "string",
20 "array",
21 "string",
22 "string"
23 ]
24},
25{
26 "file":"/srv/mediawiki/php-1.27.0-wmf.16/extensions/Translate/utils/MessageGroupStats.php",
27 "line":489,
28 "function":"Closure$MessageGroupStats::queueUpdates",
29 "args":[
30 "DatabaseMysqli",
31 "string"
32 ]
33},
34{
35 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/db/Database.php",
36 "line":2477,
37 "function":"Closure$MessageGroupStats::runWithLock",
38 "args":[
39
40 ]
41},
42{
43 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/db/Database.php",
44 "line":2688,
45 "function":"runOnTransactionIdleCallbacks",
46 "class":"DatabaseBase",
47 "type":"->",
48 "args":[
49
50 ]
51},
52{
53 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/db/loadbalancer/LoadBalancer.php",
54 "line":1068,
55 "function":"commit",
56 "class":"DatabaseBase",
57 "type":"->",
58 "args":[
59 "string",
60 "string"
61 ]
62},
63{
64 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/db/loadbalancer/LBFactory.php",
65 "line":206,
66 "function":"commitMasterChanges",
67 "class":"LoadBalancer",
68 "type":"->",
69 "args":[
70 "string"
71 ]
72},
73{
74 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/db/loadbalancer/LBFactoryMulti.php",
75 "line":395,
76 "function":"Closure$LBFactory::forEachLBCallMethod",
77 "args":[
78 "LoadBalancer",
79 "string",
80 "array"
81 ]
82},
83{
84 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/db/loadbalancer/LBFactory.php",
85 "line":209,
86 "function":"forEachLB",
87 "class":"LBFactoryMulti",
88 "type":"->",
89 "args":[
90 "Closure$LBFactory::forEachLBCallMethod;1707977980",
91 "array"
92 ]
93},
94{
95 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/db/loadbalancer/LBFactory.php",
96 "line":251,
97 "function":"forEachLBCallMethod",
98 "class":"LBFactory",
99 "type":"->",
100 "args":[
101 "string",
102 "array"
103 ]
104},
105{
106 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/MediaWiki.php",
107 "line":561,
108 "function":"commitMasterChanges",
109 "class":"LBFactory",
110 "type":"->",
111 "args":[
112 "string",
113 "array"
114 ]
115},
116{
117 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/MediaWiki.php",
118 "line":539,
119 "function":"preOutputCommit",
120 "class":"MediaWiki",
121 "type":"::",
122 "args":[
123 "RequestContext"
124 ]
125},
126{
127 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/MediaWiki.php",
128 "line":743,
129 "function":"doPreOutputCommit",
130 "class":"MediaWiki",
131 "type":"->",
132 "args":[
133
134 ]
135},
136{
137 "file":"/srv/mediawiki/php-1.27.0-wmf.16/includes/MediaWiki.php",
138 "line":519,
139 "function":"main",
140 "class":"MediaWiki",
141 "type":"->",
142 "args":[
143
144 ]
145},
146{
147 "file":"/srv/mediawiki/php-1.27.0-wmf.16/index.php",
148 "line":43,
149 "function":"run",
150 "class":"MediaWiki",
151 "type":"->",
152 "args":[
153
154 ]
155},
156{
157 "file":"/srv/mediawiki/w/index.php",
158 "line":3,
159 "function":"include",
160 "args":[
161 "string"
162 ]
163}

Event Timeline

@Krinkle Looking at the trace I do not see how this is related to Special:MyLanguage (feature of core nowdays). Could you either fix the title/content or explain. Please also justify the "Unbreak now" and be explicit if you expect the Language team to address this.

The codfw switchover will need read-only mode, and these errors kind of block that.

I'd considered it "very high", FWIW.

Ok, but the conflict with title and the stack trace remains. Must I assume that title is wrong and stack trace is right?

aaron renamed this task from GET "/wiki/Special:MyLanguage/<Something>" must not throw DBReadOnlyError to GET "?title=Special:Translate&group=X&action=page" must not throw DBReadOnlyError.Mar 18 2016, 4:59 PM

Some referrer URLs for log entries are like "?title=Special:Translate&group=X&action=page", with the API call URL is "/w/api.php?action=query&format=json&meta=languagestats&lslanguage=de", which has the error.

Other URLs include things like "/wiki/Special:MyLanguage/Translation_requests" and "/wiki/Translation_teams/sah".

aaron renamed this task from GET "?title=Special:Translate&group=X&action=page" must not throw DBReadOnlyError to Various HTTP GET URLs must not throw DBReadOnlyError (due to MessageGroupStats).Mar 18 2016, 5:08 PM

We can probably ignore Special:Translate referrer URLs, since it's just an interactive JS page. The /wiki/ URLs are a problem though.

Change 278548 had a related patch set uploaded (by Nikerabbit):
Avoid DBReadOnlyError in MessageGroupStats

https://gerrit.wikimedia.org/r/278548

Change 278548 merged by jenkins-bot:
Avoid DBReadOnlyError in MessageGroupStats

https://gerrit.wikimedia.org/r/278548

Nikerabbit claimed this task.

Assuming fixed, please re-open with more details if necessary.

Confirmed. I can load https://www.mediawiki.org/wiki/Special:MyLanguage/News without problems now, when setting XMD to codfw and read-only mode.