ConSol-Monitoring / snclient

SNClient+ - Cross platform monitoring agent
MIT License
47 stars 9 forks source link

Memory leak on verison 0.24 #122

Open pyves007 opened 1 month ago

pyves007 commented 1 month ago

Hello, after have tested the version 0.24.0 since the 27th May, it seems that there is steal some memory leaks. image I could imagine that we are not alone with this issue. Have a nice day, Py

sni commented 1 month ago

so far, i cannot see any memory issues with the 0.24 on any of the systems i have control of. What are you plotting there? And maybe add some information about which os that is or so?

FranckSallet commented 1 month ago

hello

I confirm that the memory leak is still present I saw it on Windows Server 2016 and 2019 I have a suspicion about "wrapped scripts"...

before: memory_snclient1

after: memory_snclient2

sni commented 1 month ago

yeah, would be helpful if you could pin down the leak to some specific functionality.

lgmu commented 1 month ago

@pyves007 @FranckSallet we just released 0.25 - it reduces memory usage overall. Could you please give us feedback with that version?

pyves007 commented 1 month ago

Thank you, i'll test it.

lgmu commented 1 month ago

I installed it on a windows server 2019 on friday and didn't notice anything regarding memory usage over the weekend. If you still have this issue, please attach your config and let us know which features you use.

FranckSallet commented 1 month ago

Hi

memory leak is still present in version 0.25 I notice that the memory issue seems not to be present when using just the builtin check command. Snclient's memory increases each time an "external script" is used.

Regards

lgmu commented 1 month ago

Hi, thanks for your feedback. I could see a slight increase in memory usage when executing ps1 Scripts. Are you also running ps1 scripts or something else?

FranckSallet commented 1 month ago

yes, mainly powershell scripts

lgmu commented 1 month ago

I've tested this with 1000 executions of a ps1 script, but the memory only increased from 12 to around 16MB. How long do your powershell scripts run? Could you check if a particular one causes this?

sni commented 2 days ago

i cannot reproduce it either. Running ps1 scripts and wrapped ps1 script in a loop but the memory usage is stable.

Could you try to pin this issue (if it still occurs) to a specific check? That would be helpful.