API returning a 503 error for the same query
Open, LowPublic

Description

Access the following URL: https://commons.wikimedia.org/w/api.php?action=query&list=allimages&ailimit=max&continue=-||&aicontinue=20150312000632|Giannone_-_In_cui_contiensi_la_polizia_del_Regno_sotto_i_Normanni%2C_Svevi_ed_Angioini%2C_1770.djvu&aistart=20150312000000&aiend=20150312235959&aisort=timestamp&aidir=newer&aiprop=user|sha1|size|dimensions|mime|timestamp|comment|metadata&servedby=&requestid=1207435402

If not logged in as an administrator or bot, the API returns data normally, as expected. But if logged in as a Commons administrator or bot (and thus with the higher API limits), the script returns a 503 error every time, presumably due to an internal timeout being triggered for an internal component.

I believe this is related to but is not the same problem as T86611. Namely, that the API is not gracefully handling files with extremely large metadata (the first djvu it attempts to access above, for example, as 4.3 MB worth of data).

Magog_the_Ogre updated the task description. (Show Details)
Magog_the_Ogre raised the priority of this task from to Needs Triage.
Magog_the_Ogre added a project: MediaWiki-API.
Magog_the_Ogre added a subscriber: Magog_the_Ogre.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMar 13 2015, 6:42 PM
Anomie added a subscriber: Anomie.Mar 13 2015, 11:38 PM

Was there any useful information on the 503 page, such as a reference code that we could use to look up the error. Unfortunately, thanks to T88393, I can't use api.log to try to find a timestamp for your query to try to track it down myself or to see whether it actually did time out.

T86611 seems unlikely to be related except in the loosest possible sense that both have to do with the API and images with excessive metadata.

Request: GET http://commons.wikimedia.org/w/api.php?action=query&list=allimages&ailimit=max&continue=-||&aicontinue=20150312000632|Giannone_-_In_cui_contiensi_la_polizia_del_Regno_sotto_i_Normanni%2C_Svevi_ed_Angioini%2C_1770.djvu&aistart=20150312000000&aiend=20150312235959&aisort=timestamp&aidir=newer&aiprop=user|sha1|size|dimensions|mime|timestamp|comment|metadata&servedby=&requestid=1207435402, from 10.64.32.107 via cp1068 cp1068 ([10.64.0.105]:3128), Varnish XID 1676636299
Forwarded for: <IPv6 redacted>, 10.64.32.107, 10.64.32.107
Error: 503, Service Unavailable at Sat, 14 Mar 2015 17:10:15 GMT
Aklapper triaged this task as Low priority.Mar 16 2015, 9:36 AM
GOIII added a subscriber: GOIII.Nov 5 2015, 12:03 AM