Ensure DB disconnects before process fork.