Too many RPC requests

Hi everyone,
When I trying to execute the code:
declare (“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection. []”, null, {path: 0});
I got an error:
“Too many commit iterations”
So in the configuration file /opt/genieacs/genieacs.env I added:
GENIEACS_MAX_COMMIT_ITERATIONS=500
Then I got the error:
Too many RPC requests

How I can fix it? I have genieacs version 1.2.8

Look in your logs. You likely have one script trying to add WANIpConnection instances. And this one which is clearing them out.

This is my script:

let login = args[0]
let haslo = args[1]

const now = Date.now();

declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.[]”, null, {path: 0});

declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*”, null, {path: 2});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.X_WANGponLinkConfig.802-1pMark”, {value: now}, {value: 1});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.X_WANGponLinkConfig.VLANIDMark”, {value: now}, {value: 100});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.X_WANGponLinkConfig.Mode”, {value: now}, {value: 2});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.X_WANGponLinkConfig.Enable”, {value: now}, {value: 1});

declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.*”, null, {path: 1});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.ConnectionType”, {value: now}, {value: ‘IP_Routed’});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.NATEnabled”, {value: now}, {value: true});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.X_ServiceList”, {value: now}, {value: ‘TR069,INTERNET’});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.X_LanInterface-DHCPEnable”, {value: now}, {value: true});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Username”, {value: now}, {value: login});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Password”, {value: now}, {value: haslo});
declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Enable”, {value: now}, {value: true});

When I comment declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.[]”, null, {path: 0}); everything works correctly.

What other provision scripts do you have? This script isn’t the root-cause of your issue.

Also, the second half of your script only works by pure luck. You are never guaranteed an instance number. I.e., if you delete all the instances from InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection and add a new WANPPPConnection instance, the new instance number is not guaranteed to be 1.

This is how you want to change your script:

declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.[ConnectionType:IP_Routed,NATEnabled:true,X_ServiceList:'TR069,INTERNET',X_LanInterface-DHCPEnable:true,Enabled:true,Username:" + username + ',Password:' + haslo, {path: 1}, {path: 1});

The only syntax I’m not 100% sure on is the argument with an embedded “,”. Maybe @zaidka could chime in on this part.