Pywikibot accepts API maxlag. If maxlag is above 5 s threshold (common to all Wikimedia wikis), Pywikibot waits with requests until maxlag drops. Average Wikidata API maxlag has been 650 ms (similar to any other Wikimedia wiki), so this has never been an issue until now.
- On 20th Nov, 2019 Wikidata API maxlag jumped from average 650 ms to average 2.2 s. This happened possibly due to T221774: Add Wikidata query service lag to Wikidata maxlag. Since then maxlag was repeatedly getting close to 5 s threshold. It was still fine though, as the 5 s threshold has been exceeded only few times.
- On 20th Jan, 2020 Wikidata API maxlag jumped once again from average 2.2 s to average 4.9 s. The cause of the jump is still unknown to this date. The 5 s threshold has been exceeded every day since then. This causes several issues to occur during peak time:
- users are unable to use Pywikibot with Wikidata: T242081#5853949, T244030
- Pywikibot tests are failing with Timeout: https://travis-ci.org/wikimedia/pywikibot/jobs/633377671#L3591
- Pywikibot tests are failing with EntityTypeUnknownException (which seems to be a malformed cache because of Timeout on cache's creation): T242083 (https://travis-ci.org/wikimedia/pywikibot/jobs/633377685#L1496) and also some other issues (login issues)