pessimistic db disconnection handling