avoid server crash when db server lost connection