added explicit timeout for failing queries