Hi, The default setup with 5 retries and 1 second delay would work if the function works across requests. My guess is that the third request cannot use the data from the first request.
The timeline would be something like (with a second gap between each line) T0 - Request #1 - function #1 starts T1 - Request #2 - function #2 starts - request #1 times out T2 - Request #3 - function #3 starts - request #2 times out T3 - Request #4 - function #4 starts - request #3 times out - function #1 responds to request #1 but it is ignored because that request timed out T4 - Request #5 - function #5 starts - request #4 times out - function #2 responds to request #2 but it is ignored because that request timed out You either want the function to work across requests or increase the timeout or run the function once and share the result. T0 - Request #1 - function starts T1 - Request #2 - function not started as its running - request #1 times out T2 - Request #3 - function not started as its running - request #2 times out T3 - Request #4 - function not started as its running - we have a result! return it for request 4 and cache it! Which way you go depends on how expensive the function is and how fresh the data needs to be. If you know you are polling once every 5 minutes you could just run the function in cron every 5 minutes; the data might be up to slightly less than 5 minutes old. - Craig On Thu, 5 May 2022 at 17:12, Feroz <feroz.afs...@gmail.com> wrote: > 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-coders mailing list > Net-snmp-coders@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders >
_______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders