automatically restart long running expired queries