diff --git a/nativelink-config/src/stores.rs b/nativelink-config/src/stores.rs index db480ed5a..3a48e403e 100644 --- a/nativelink-config/src/stores.rs +++ b/nativelink-config/src/stores.rs @@ -1156,10 +1156,16 @@ pub struct GrpcSpec { pub connections_per_endpoint: usize, /// Maximum time (seconds) allowed for a single RPC request (e.g. a - /// ByteStream.Write call) before it is cancelled. This prevents - /// individual RPCs from hanging forever on dead connections. + /// ByteStream.Write call) before it is cancelled. /// - /// Default: 120 (seconds) + /// A value of 0 (the default) disables the per-RPC timeout. Dead + /// connections are still detected by the HTTP/2 and TCP keepalive + /// mechanisms configured on each endpoint. + /// + /// For large uploads (multi-GB), either leave this at 0 or set it + /// large enough to accommodate the full transfer time. + /// + /// Default: 0 (disabled) #[serde(default, deserialize_with = "convert_duration_with_shellexpand")] pub rpc_timeout_s: u64, } diff --git a/nativelink-store/src/grpc_store.rs b/nativelink-store/src/grpc_store.rs index 3fc3625d3..2966cd1e3 100644 --- a/nativelink-store/src/grpc_store.rs +++ b/nativelink-store/src/grpc_store.rs @@ -90,11 +90,7 @@ impl GrpcStore { endpoints.push(endpoint); } - let rpc_timeout = if spec.rpc_timeout_s > 0 { - Duration::from_secs(spec.rpc_timeout_s) - } else { - Duration::from_secs(120) - }; + let rpc_timeout = Duration::from_secs(spec.rpc_timeout_s); Ok(Arc::new(Self { instance_name: spec.instance_name.clone(),