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.
This commit is contained in:
parent
357d1711be
commit
d44682ce9c
2 changed files with 6 additions and 5 deletions
|
|
@ -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)]
|
||||
|
|
|
|||
|
|
@ -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)]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue