better mysql load balancing and health checking to avoid db hangs