https://bugzilla.wikimedia.org/show_bug.cgi?id=72209
--- Comment #3 from John Mark Vandenberg jayvdb@gmail.com --- (In reply to Mpaa from comment #2)
It tries to fetch only the number of elements left to reach 5. When 1 is reached, it stays there for 12000 queries ..
But MW doesnt return one row, as requested..?
Yes, pywikibot will need to detect that it is 'getting nowhere slowly', and exponentially increase the new_limit until it finds data or end of dataset.