Page MenuHomePhabricator

Watchlist for bot too long so /raw triggers an error
Closed, DeclinedPublic


Author: warddr

My bot has a huge watchlist (all pages that are created using this bot) of 116k pages. I'd like to empty it since pywikipediabot sometimes updates the local cache of these pages and it takes forever.

The problem is that /raw results in an error (I assume it is timeout related):

Our servers are currently experiencing a technical problem. This is probably temporary and should be fixed soon. Please try again in a few minutes.
If you report this error to the Wikimedia System Administrators, please include the details below.
Request: GET, from via cp1067 cp1067 ([]:3128), Varnish XID 1763728516
Forwarded for:,,,
Error: 503, Service Unavailable at Thu, 17 Apr 2014 21:46:12 GMT

retrying doesn't work. What can I do about this?

Version: 1.23.0
Severity: normal
OS: Linux
Platform: PC
See Also:



Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:15 AM
bzimport set Reference to bz64074.
bzimport added a subscriber: Unknown Object (MLST).

Workaround using pywikibot-core:

import sys, pywikibot
site = pywikibot.Site()

if pywikibot.inputChoice('Are you sure you want to clear your watchlist on %s?' % site, ['yes', 'no'], ['y', 'n'], 'n') == 'n':


while True:

wt =, action='tokens', type='watch').submit()['tokens']['watchtoken']
wd =, action='watch', unwatch=True, generator='watchlistraw', gwrlimit=5000, token=wt).submit()
if not wd['watch']:
   print "%i pages removed..." % len(wd['watch'])

(store in scripts/; then python clearwatchlist -site:... -lang:...)

warddr wrote:

This workaroud fixed the problem for me, thanks Merlijn!
A more elegant solution would be nice (one in the mediawiki software), but this one works in the rare occasion of a huge watchlist.