Radish alpha
h
rad:z3gqcJUoA1n9HaHKufZs5FCSGazv5
Radicle Heartwood Protocol & Stack
Radicle
Git
node: use 300s as default upload-pack timeout
Archived gy@morty opened 1 year ago

While working with larger repositories (.git/ folder is 778 MiB in my case), I find my public node frequently emits warnings like

WARN  worker   Read channel timed out for upload-pack rad:<rid>

I’d like to suggest to make the default fetch timeout longer to be 300s (5 minutes), which is more balanced than the previous 1 hour or 3 seconds timeout.

In the future it might also be desirable to allow configurable fetch timeouts, but this patch does not address this.

Signed-off-by: Gaoyang Zhang gy@blurgy.xyz

1 file changed +2 -2 034eb418 6c589425
modified radicle-node/src/service.rs
@@ -101,8 +101,8 @@ pub const MIN_RECONNECTION_DELTA: LocalDuration = LocalDuration::from_secs(3);
pub const MAX_RECONNECTION_DELTA: LocalDuration = LocalDuration::from_mins(60);
/// Connection retry delta used for ephemeral peers that failed to connect previously.
pub const CONNECTION_RETRY_DELTA: LocalDuration = LocalDuration::from_mins(10);
-
/// How long to wait for a fetch to stall before aborting, default is 3s.
-
pub const FETCH_TIMEOUT: time::Duration = time::Duration::from_secs(3);
+
/// How long to wait for a fetch to stall before aborting, default is 300s.
+
pub const FETCH_TIMEOUT: time::Duration = time::Duration::from_secs(300);
/// Target number of peers to maintain connections to.
pub const TARGET_OUTBOUND_PEERS: usize = 8;