Occurring three times (two retries), recentchanges in PHP raised DBQueryError. This was a few builds ago, yesterday, and hasnt reoccurred since.
requests.packages.urllib3.connectionpool: DEBUG: "GET /w/api.php?rcprop=user%7Ccomment%7Ctimestamp%7Ctitle%7Cids%7Csizes%7Credirect%7Cloginfo%7Cflags&maxlag=5&format=json&rclimit=5&list=recentchanges&rcnamespace=6%7C7&rcshow=&continue=&meta=userinfo&indexpageids=&action=query&uiprop=blockinfo%7Chasmsg HTTP/1.1" 200 117 pywiki: ERROR: Detected MediaWiki API exception DBQueryError; retrying pywiki: VERBOSE: MediaWiki exception DBQueryError details: query= {u'action': [u'query'], u'continue': [True], u'format': [u'json'], u'indexpageids': [True], 'list': [u'recentchanges'], u'maxlag': ['5'], u'meta': [u'userinfo'], u'rclimit': [u'5'], u'rcnamespace': [6, 7], 'rcprop': [u'user', u'comment', u'timestamp', u'title', u'ids', u'sizes', u'redirect', u'loginfo', u'flags'], u'rcshow': <pywikibot.data.api.OptionSet object at 0x5570910>, 'rctoponly': [False], u'uiprop': [u'blockinfo', u'hasmsg']} response= {u'servedby': u'mw1130', u'error': {u'info': u'[bfd910ab] Database query error', u'code': u'internal_api_error_DBQueryError'}} pywiki: WARNING: Waiting 5 seconds before retrying. requests.packages.urllib3.connectionpool: DEBUG: "GET /w/api.php?rcprop=user%7Ccomment%7Ctimestamp%7Ctitle%7Cids%7Csizes%7Credirect%7Cloginfo%7Cflags&maxlag=5&format=json&rclimit=5&list=recentchanges&rcnamespace=6%7C7&rcshow=&continue=&meta=userinfo&indexpageids=&action=query&uiprop=blockinfo%7Chasmsg HTTP/1.1" 200 118 pywiki: ERROR: Detected MediaWiki API exception DBQueryError; retrying pywiki: VERBOSE: MediaWiki exception DBQueryError details: query= {u'action': [u'query'], u'continue': [True], u'format': [u'json'], u'indexpageids': [True], 'list': [u'recentchanges'], u'maxlag': ['5'], u'meta': [u'userinfo'], u'rclimit': [u'5'], u'rcnamespace': [6, 7], 'rcprop': [u'user', u'comment', u'timestamp', u'title', u'ids', u'sizes', u'redirect', u'loginfo', u'flags'], u'rcshow': <pywikibot.data.api.OptionSet object at 0x5570910>, 'rctoponly': [False], u'uiprop': [u'blockinfo', u'hasmsg']} response= {u'servedby': u'mw1148', u'error': {u'info': u'[8ae26643] Database query error', u'code': u'internal_api_error_DBQueryError'}} pywiki: WARNING: Waiting 10 seconds before retrying. requests.packages.urllib3.connectionpool: DEBUG: "GET /w/api.php?rcprop=user%7Ccomment%7Ctimestamp%7Ctitle%7Cids%7Csizes%7Credirect%7Cloginfo%7Cflags&maxlag=5&format=json&rclimit=5&list=recentchanges&rcnamespace=6%7C7&rcshow=&continue=&meta=userinfo&indexpageids=&action=query&uiprop=blockinfo%7Chasmsg HTTP/1.1" 200 118 pywiki: ERROR: Detected MediaWiki API exception DBQueryError; retrying pywiki: VERBOSE: MediaWiki exception DBQueryError details: query= {u'action': [u'query'], u'continue': [True], u'format': [u'json'], u'indexpageids': [True], 'list': [u'recentchanges'], u'maxlag': ['5'], u'meta': [u'userinfo'], u'rclimit': [u'5'], u'rcnamespace': [6, 7], 'rcprop': [u'user', u'comment', u'timestamp', u'title', u'ids', u'sizes', u'redirect', u'loginfo', u'flags'], u'rcshow': <pywikibot.data.api.OptionSet object at 0x5570910>, 'rctoponly': [False], u'uiprop': [u'blockinfo', u'hasmsg']} response= {u'servedby': u'mw1235', u'error': {u'info': u'[16606b61] Database query error', u'code': u'internal_api_error_DBQueryError'}}
https://travis-ci.org/wikimedia/pywikibot-core/jobs/65289168#L1518