Improve Mutithread db operations, Whenever error happens, the db conn will be manully closed.