refs  #6557 Set max_allowed_packet and wait_timeout to prevent random mysql gone away