MZMcBride wrote: > I'm not sure of the exact configuration, but it seems like nearly every API > request is being handled by the lagged server (db36)? Or perhaps my scripts > just have terrible luck.
I added some prints to the code. Different servers are responding, but they're all unable to get past the lag, apparently: {u'servedby': u'srv234', u'error': {u'info': u'Waiting for 10.0.6.46: 21948 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'srv242', u'error': {u'info': u'Waiting for 10.0.6.46: 21982 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'mw20', u'error': {u'info': u'Waiting for 10.0.6.46: 21984 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'mw45', u'error': {u'info': u'Waiting for 10.0.6.46: 21986 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'mw14', u'error': {u'info': u'Waiting for 10.0.6.46: 21988 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'mw42', u'error': {u'info': u'Waiting for 10.0.6.46: 21989 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'mw3', u'error': {u'info': u'Waiting for 10.0.6.46: 21991 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'srv230', u'error': {u'info': u'Waiting for 10.0.6.46: 22005 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'srv259', u'error': {u'info': u'Waiting for 10.0.6.46: 22006 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'srv274', u'error': {u'info': u'Waiting for 10.0.6.46: 22008 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'srv280', u'error': {u'info': u'Waiting for 10.0.6.46: 22009 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'srv236', u'error': {u'info': u'Waiting for 10.0.6.46: 22010 seconds lagged', u'code': u'maxlag'}} {u'servedby': u'srv230', u'error': {u'info': u'Waiting for 10.0.6.46: 22011 seconds lagged', u'code': u'maxlag'}} And it goes on and on. The relevant branch of code is: --- def __parseJSON(self, data): maxlag = True while maxlag: try: maxlag = False parsed = json.loads(data.read()) content = None if isinstance(parsed, dict): content = APIResult(parsed) content.response = self.response.items() elif isinstance(parsed, list): content = APIListResult(parsed) content.response = self.response.items() else: content = parsed if 'error' in content: error = content['error']['code'] if error == "maxlag": lagtime = int(re.search("(\d+) seconds", content['error']['info']).group(1)) if lagtime > self.wiki.maxwaittime: lagtime = self.wiki.maxwaittime print("Server lag, sleeping for "+str(lagtime)+" seconds") maxlag = True time.sleep(int(lagtime)+0.5) return False --- MZMcBride _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l