Page MenuHomePhabricator

Unexpected ratelimit makes Pywikibot crash
Closed, ResolvedPublic


Due to the hack done in T184948 Pywikibot crashed with this nice error. failed-save: The save has failed. [help:See for API usage. Subscribe to the mediawiki-api-announce mailing list at <> for notice of API deprecations and breaking changes.; messages:[{'name': 'wikibase-api-failed-save', 'parameters': [], 'html': {'*': 'The save has failed.'}}, {'name': 'actionthrottledtext', 'parameters': [], 'html': {'*': 'As an anti-abuse measure, you are limited from performing this action too many times in a short space of time, and you have exceeded this limit.\nPlease try again in a few minutes.'}}]]
<class ''>
CRITICAL: Closing network session.

Same hack also broke massmessage, see T192690. The hack was removed so the chance of someone running into this is much lower.

Pywikibot should be updated so that a throttle error is a recoverable error. So the usual logic should kick in: Wait a bit, try again.

Event Timeline

Cannot follow this task. Pywikibot is throttleling not to edit more than 6 (I guess) pages per minute by default. What might be the reason that the limit of 40 pages is exceeded. What was the putthrottle setting when the exception occurred?

@Multichill is the error still given ? I've read somewhere that this hacky limitation was removed from

Multichill lowered the priority of this task from High to Low.Sep 2 2018, 11:55 AM

@Multichill is the error still given ? I've read somewhere that this hacky limitation was removed from

Yes and no. The ratelimit was removed again I think so we won't run into it. I changed the prio from high to low. Pywikibot should be updated that if the bot for whatever reason runs into a ratelimit error, it should be handled as a recoverable error. I'll update the task

@Xqt flagged bots on Wikidata usually edit a bit faster than one edits every six seconds, most of my bots are one edit every two seconds.

Change 510690 had a related patch set uploaded (by Xqt; owner: Xqt):
[pywikibot/core@master] [IMPR] 'actionthrottledtext' is a retryable wikibase error

Change 510690 merged by jenkins-bot:
[pywikibot/core@master] [IMPR] 'actionthrottledtext' is a retryable wikibase error