Slightly better handling for dropped database connection