Handle connection failures on database side as well.