The API is always returning a 500 status code when it hits the following URL: https://commons.wikimedia.org/w/api.php?list=allimages&ailimit=max&action=query&continue=-||&aistart=20180216000000&aiend=20180216235959&aisort=timestamp&aidir=newer&aiprop=user|sha1|size|dimensions|mime|timestamp|comment|metadata&aicontinue=20180216045510|Этнографическое_обозрение%2C_кн._072-073._%281907_№1%2C2%29.pdf.
The bot has run a query similar to this for several years, so it's probably a data issue (e.g. lots of files with large metadata). I feel like something is misconfigured on Wikimedia's end or on my end. Any help would be appreciated; thanks.