So on one of the servers we manage I have EventSentry performance monitoring installed. Lately I've been getting alerts from that server from ES in regards to the MeshAgent having a very large number of handles open (and the count continues to climb every day).
This is what tonight's alert is saying:
_The performance counter "Performance ApplicationsApplications: Handles" ("Process(*)Handle Count", instance "MeshAgent") on host SERVER2019 exceeded the threshold of 15000, the current values are:
Average: 19318
Minimum: 19256
Maximum: 19378
Top 3 instances:
MeshAgent (19318)
AvastSvc (7859)
lsass (3130)
Counter Description:
The total number of handles currently open by this process. This number is equal to the sum of the handles currently open by each thread in this process._
Sure enough, when I fire up ProcessExplorer it is showing that MeshAgent has over 19,000 handles open. And it just shows 'Unknown' for the type. So I'm suspecting the MeshAgent has a handle leak. Not sure if this is happening on other OS's besides Server 2019 (as I haven't yet checked).
I just took a look at a Server2016 box. Same issue there. Only this one as more open (as the server has been up a few days longer).
This doesn't appear to be an issue on Server 2012 (it only has about 2,200 handles open on this Server2012 box).
It also doesn't appear to happen under Windows 10 either. The box I just looked at (which is never turned off) only has 848 handles open by MeshAgent. Although, on that same box, Outlook 2019 has 40,911 handles open! So I don't like that either.. lol
I fixed a windows bug a few weeks ago where handles were leaking whenever a child process was spawned. That should get included in the agent update we're planning next week.
Thank you Bryan!
Published MeshCentral v0.4.1-a with all new MeshAgents for all platforms. Once updated, let us know if the Windows agent still behaves this way.
I just updated my server to 0.4.1-b and will keep an eye on this. It usually takes a few days before the handles would grow to an abnormal amount.
BTW, the new mouse tracking update is AWESOME. That is very, very much appreciated! The cursor is now spot on. No more guessing where it's at to resize windows, etc.
So far it looks like this bug has been squashed. I've been watching the same servers that were exhibiting this handles issue. I haven't seen the handles used by MeshAgent growing much past 1,500 or so.
Good. Bryan things he did fix this. I will close it, but please re-open if you see this happen again.
So, strangely, this problem seems to have returned. I just got an alert from one of my servers (the same server that I had originally gotten the alert from due to the monitoring software that is on it) that the MeshAgent is using a very large number of handles.
I'm still on 0.4.3-q.
"The performance counter "Performance ApplicationsApplications: Handles" ("Process(*)Handle Count", instance "MeshAgent") on host SERVER2019 exceeded the threshold of 15000, the current values are:
Average: 16082
Minimum: 16038
Maximum: 16131
Top 3 instances:
MeshAgent (16082)
AvastSvc (9321)
svchost#52 (3980
I fixed a resource leak on windows a few weeks ago, we'll see if this is the issue in the upcoming release.
Most helpful comment
I fixed a windows bug a few weeks ago where handles were leaking whenever a child process was spawned. That should get included in the agent update we're planning next week.