Implement timeout for the deadlock of traverse & transactions.