Hello,
We have noticed that when making a large amount of API calls (invoke/delete) we are seeing large increases in database connections. This is causing the entire SolarWinds web client to grind to a halt unable to load pages.
For example we run a script that refreshes the interfaces on a node using DELETE calls and INVOKE calls:
delete all interfaces:
"SELECT Uri "
"FROM Orion.NPM.Interfaces "
f"WHERE NodeID = {node_id}"
)
uris = [x["Uri"] for x in query["results"]]
swis._req("POST", "BulkDelete", {"uris": uris})
add interfaces after filtering:
"Orion.NPM.Interfaces", "DiscoverInterfacesOnNode", node_id
)
interfaces = result["DiscoveredInterfaces"]
interfaces = filter_interfaces(interfaces, apply_filter)
swis.invoke(
"Orion.NPM.Interfaces",
"AddInterfacesOnNode",
node_id,
interfaces,
"AddDefaultPollers",
)Running this on a single node can increase database connections by 200. This is seen under "User Connections" on the "AppInsight for SQL" page. If we run this code for 10 nodes the number of connections spikes up to ~1.5k which severely hinders the responsiveness of the web client.
- Is this expected? Do invoke calls normally generate a lot of subsequent database calls? Is bulkdelete the culprit? (i tried individual deletes).
- Is there a way to rate limit our API calls? Happy to throw some sleeps between each node run if not.