MeshCentral-ScriptTask
MeshCentral-ScriptTask copied to clipboard
High CPU usage with ScriptTask plugin enabled
Hey there,
I've been ramping up my use of ScriptTask for scheduling scripts across a reasonable number of agents, and had noticed mongod CPU usage burst to 100% very regularly.
Monitoring CPU usage of the server, disabling ScriptTask results in this drop in CPU:
I do have > 120k rows in the plugin_scripttask collection:
rs:PRIMARY> db.getCollection("plugin_scripttask").find({}).count()
122373
From looking at the code, I can see some spinning over the data each minute (updateFrontEnd, historyData). I haven't looked too hard to see how it can be solved, but I thought I'd log this as a heads up for others and if I find any improvements, I'll report back.
Thanks!