However, I am still not sure why it is taking over 3 hours to complete
running it manually it sits @ Cleaning UP DB for the 90% of the time
At that time the load an cpu utilization of the VM are almost maxed out.
VM has 12gb or memory and 6 virtual CPU’s (I increased this from 6gb of memory and 4 vCPU a little while back to see if it would help anything… it has not)
Just wondering if you got to the bottom of this, as I’m having the same issue: Stuck at “Cleaning up DB” for hours on end, with the associated php process taking CPU and swallowing memory as it goes.
EDIT: I’ve worked this out: It was stuck on the “recalculate_device_dependencies” section of the daily script. Turns out it doesn’t help to have devices that point to each other as a dependency … my daily update was stuck in an infinite loop, endlessly SELECTing and UPDATEing the max_depth column in the devices table. After fixing the device dependencies, the script runs fine.
I was having this problem to, but it’s either a bug or a feature request.
We have a routing OSPF backbone and each core router has multiple connections to adjacent routers, so in theory a router is dependent on other routers being up and visa versa.
So the network engineers had setup LibreNMS with the routers being dependent on each other and basically got us into the recalculate loop.