fix sql exception on connection timeout