markabrahams / node-net-snmp

JavaScript implementation of the Simple Network Management Protocol (SNMP)
206 stars 97 forks source link

registerProviders crashes at 851 providers #252

Open ivanbaj opened 4 months ago

ivanbaj commented 4 months ago

I am trying to register 1200 providers. Using

agent.registerProviders(providers);

It crashes with Unknown PDU type 0. The buffers of the snmp response gets overwritten and AgentXPdu.createFromBuffer it gets a PDU of type 0. I am assuming all PDU fields at this point are suspicious.

Thuis crash happens when the number of providers is 851 or higher. It works with 850.

I am using RedHat linux snmp as the master agent.

Then I split my array in to two arrays one with 850 and the second with the remaining providers.

I loaded the first array and set a time out of 500ms and then loaded the second array of providers. That works fine.

My question is: Does this make sense? And, if there are limit of number of providers registered to the master agent should we add some sort of batching?

markabrahams commented 3 months ago

Hi @ivanbaj - there is no limit in the net-snmp library code on the number of AgentX providers that can be registered. If you could provide the details of the error message and some code to reproduce the condition, this would help to investigate the problem further.