https://bugzilla.wikimedia.org/show_bug.cgi?id=19572

           Summary: API list=embeddedin times out when namespace specified
           Product: MediaWiki
           Version: unspecified
          Platform: All
               URL: http://en.wikipedia.org/w/api.php
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: Normal
         Component: API
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected], [email protected],
                    [email protected]


I discovered this accidentally while rewriting my archiving bot to use the API.

It gets its list of pages by examining transclusions of a particular template.
Thus, we start with
http://en.wikipedia.org/w/api.php?format=jsonfm&einamespace=5&list=embeddedin&eititle=User:MiszaBot/config&eilimit=100&action=query
- this is for the 'Wikipedia talk:' namespace.

This should work fine; we get "eicontinue": "2|MiszaBot\/config|2072126", so
let's continue on to the next batch:
http://en.wikipedia.org/w/api.php?format=jsonfm&einamespace=5&list=embeddedin&eititle=User:MiszaBot/config&eilimit=100&action=query&eicontinue=2|MiszaBot/config|2072126

Which may or may not work for you when you try it; if it does, try following
the next eicontinue. At some point (especially with "cold index cache", I
presume; which is why it's not reliably reproducible), it may choke and (after
a minute or so of waiting) you get a Wikimedia error page (in HTML, not JSON,
so the parser freaks out) from a squid explaining that an ERR_READ_TIMEOUT
occured.

I wouldn't be too hasty attributing this to the squids, because I've seen it
happen even while going 10 results per request (which really shouldn't take
that long).

Oddly, there are no problems when I just omit einamespace and filter in my
program based on the "ns" parameter of the yielded pages.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to