Hej, My 2c is: 1. (T=0) Request being sent, timeout set 1s. Request comes from IPsrc:PortSrc, PortSrc is an ephemeral port selected by the OS. 2. (T=0+network travel time(ntt)) Request received, request delegated to thread/worker. Starts loading. 3. (T=0+1) Timeout occurs on sender side. Socket returns, with an error (ETIMEOUT|EWOULDBLOCK or whatever flavor signaling scheme is used). 4. (T=1+processing time) A retry is triggered, and a new request is sent. This will come from IPsrc:PortSrc+X, X being a random number from 1 and up. 5. (T=1+ntt), Request is received, delegated to thread/worker. Starts loading. Note, NEW worker/thread. 6. (T=0+ntt+loading time 2s) Reply is sent to IPsrc:PortSrc. 7. (T=0+ntt+loading time 2s+ntt) Reply (6) is received at source, but socket PortSrc is in a blocked state (the application that would receive it isn't associated port anymore). .. then this repeats.
The only thing you can do to mitigate this (on the agent side) is to speed up the loading. Either just plain faster, or caching the loaded information somehow, so that the reply can be triggered directly, without loading for t time-units. Then refresh the information periodically, so that the returned information is as 'stale' as possible. BR/Patrik ps. use wireshark/tcpdump to see if you can see the reply at 6.. ds Den tors 5 maj 2022 kl 09:14 skrev Feroz <feroz.afs...@gmail.com>: > Hi, > We are using net-snmp 5.8. > We have Agent-SubAgent model. > > For a given MIB, our container_load function takes 2 seconds, but still > the snmpwalk (v2) command times out with default values (5 retries with 1 > sec delay between each retry). > > My question is, why does it time out, though the container_load function > returns the data in 2sec, we still have another 4 seconds. > We should have got the response in the 3rd to 5th retry. > > If I increase the timeout value in snmpwalk command with "-t 3", it works > fine. > -- > Regards, > Feroz Ahmed > _______________________________________________ > Net-snmp-users mailing list > Net-snmp-users@lists.sourceforge.net > Please see the following page to unsubscribe or change other options: > https://lists.sourceforge.net/lists/listinfo/net-snmp-users >
_______________________________________________ Net-snmp-users mailing list Net-snmp-users@lists.sourceforge.net Please see the following page to unsubscribe or change other options: https://lists.sourceforge.net/lists/listinfo/net-snmp-users