Page MenuHomePhabricator

API query times out
Open, LowPublic

Description

A specific API query that my bot is trying to run is timing out. I've tried to run about 15 times and it reliably times out every time.

https://commons.wikimedia.org/w/api.php?list=allimages&ailimit=max&action=query&continue=-||&aistart=20191007000000&aiend=20191007235959&aisort=timestamp&aidir=newer&aiprop=user|sha1|size|dimensions|mime|timestamp|comment|metadata&aicontinue=20191007083149|Stift_Klosterneuburg_A3.jpg&format=php&servedby=&requestid=1141644342

A sample response:

Request from [redacted] via cp1079 cp1079, Varnish XID 918790924

Related Objects

StatusAssignedTask
OpenNone
OpenNone
ResolvedJdlrobson
OpenNone
OpenNone
OpenNone
Resolvedcscott
Duplicatecscott
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
ResolvedUmherirrender
DuplicateNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone
OpenNone

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 9 2019, 12:53 AM

Note: if you run this query as a normal user, it will succeed. It only fails when logged in as a bot or administrator with the higher limits.

Restricted Application added a project: Core Platform Team. · View Herald TranscriptOct 9 2019, 12:54 AM
Anomie moved this task from Inbox to Triage Meeting Inbox on the Core Platform Team board.
Anomie moved this task from Unsorted to Needs details or plan on the MediaWiki-API board.
Anomie added a subscriber: Anomie.

I see only four log entries for this request (specifically, for requests containing "Stift_Klosterneuburg_A3" in the URI) in the past 24 hours. Two indicate the same error as in T187759: API is returning 500 status code. One indicates that the query was being slow to execute. And one seems to be indicating that a 500 response was returned.

It's possible that for the other attempts the "too slow to execute" happened before it got to the point of exceeding memory usage, although I'd expect to see log entries for all those too.

daniel triaged this task as Low priority.Oct 15 2019, 8:29 PM