From d44682ce9c612554b6a6d849fa545a655c0416db Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Thu, 5 Feb 2026 09:02:05 -0600 Subject: [PATCH] fix: increase SNMP timeout to 120s for SNMPv3 discovery Discovery with SNMPv3 was completing in 52 seconds, dangerously close to the 60s timeout. Increasing to 120s provides comfortable headroom for complete MikroTik OID tree traversal with encryption overhead. --- src/snmp/client.rs | 6 +++--- src/snmp/device_poller.rs | 5 +++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/snmp/client.rs b/src/snmp/client.rs index 23524a0..dd31ef1 100644 --- a/src/snmp/client.rs +++ b/src/snmp/client.rs @@ -3,10 +3,10 @@ use crate::secret::SecretString; use snmp2::SyncSession; use std::time::Duration; -// SNMP timeout in seconds - increased to 60s for SNMPv3 operations +// SNMP timeout in seconds - increased to 90s for SNMPv3 operations // SNMPv3 has significant encryption/auth overhead, especially for large walks -// MikroTik enterprise tree (1.3.6.1.4.1.14988) can take 16+ seconds with v3 -const SNMP_TIMEOUT_SECS: u64 = 60; +// Full discovery can take 50+ seconds with complete MikroTik OID tree traversal +const SNMP_TIMEOUT_SECS: u64 = 90; /// SNMPv3 configuration bundle #[derive(Clone)] diff --git a/src/snmp/device_poller.rs b/src/snmp/device_poller.rs index beea54e..1654d9d 100644 --- a/src/snmp/device_poller.rs +++ b/src/snmp/device_poller.rs @@ -6,9 +6,10 @@ use std::str::FromStr; use std::time::Duration; use tokio::sync::{mpsc, oneshot}; -// SNMP timeout in seconds - increased to 60s for SNMPv3 operations +// SNMP timeout in seconds - increased to 90s for SNMPv3 operations // SNMPv3 has significant encryption/auth overhead -const SNMP_TIMEOUT_SECS: u64 = 60; +// Full discovery can take 50+ seconds with complete MikroTik OID tree traversal +const SNMP_TIMEOUT_SECS: u64 = 90; /// Request to perform an SNMP operation #[derive(Debug)]