fix metadata_server's regexp match and add a timeout handler to req_client