APIError: readonly: The database has been automatically locked while the slave database servers catch up to the master [readonlyreason:Waiting for 3 lagged database(s); help:See https://es.wikipedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/mailman/listinfo/mediawiki-api-announce> for notice of API deprecations and breaking changes.]
I am quite fed up with this. I'm doing a search and replace task using template.py, and I can't finish them because of continuously receiving this kind of messages that abort the grid job. Before you ask, I'm running the task via the job grid and I'm using a maxlag value of 3 (< 5, which is "nicer" & recommended, and a put_throttle waiting of 15 seconds, which is very respectful IMHO, which results in 4 edits per minute).
#!/bin/bash cd /data/project/mabot/scripts python template.py "Ficha de científico" -subst -cc -family:wikipedia -lang:es -summary:"Fusionando {{ficha de científico}} en {{ficha de persona}} por [[WP:BOT/S|solicitud]]" -always -namespace:0 -maxlag:3 -pt:15
The task should've been finished in a day or two, because it's just a couple thousand of templates that, if the job were to run without stop, it'd have been finished already.
Before you ask too, I've tried to setup a .bigbrotherrc watchdog, but apparently jstart does not work with this pywiki script:
Traceback (most recent call last): File "template.py", line 122, in <module> import pywikibot ImportError: No module named pywikibot [2017-30-04T15:14] /mnt/nfs/labstore-secondary-tools-project/mabot/.pywikibot/jobs/tarea.sh exited with code 1. Respawning...
Please help me sort this out. Either this is a Labs issue or an API issue or the eswiki db is very lagged. I don't really know, so I'd appreciate an investigation here and, oh, maybe if pywikibot could be used with jstart I could just have the bot restarted automatically.