Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long term memory use #15

Open
aslmx opened this issue Dec 1, 2020 · 4 comments
Open

Long term memory use #15

aslmx opened this issue Dec 1, 2020 · 4 comments

Comments

@aslmx
Copy link
Contributor

aslmx commented Dec 1, 2020

Hi,

i have pingwatch running for several weeks on a Raspi4 at home as well as on a VPS onthe internet.
Today i received an email from the VPS monitoring tool that warned me about high memory usage. I didn't suspect pingwatch right away because there are plenty of other applications running on the VPS. However pingwatch had - if i read htop output correctly - something over 900MB of memory allocated. And approximately this amount was gone from the memory gauge when i quit pingwatch.
Similar on the Raspi (while not so critical because it has 4GB of memory and it basically just runs a DNS server at the moment), pingwatch had something about 500-600MB allocated.

This took several weeks (4 or 5 maybe?) now.

I can think of quite easy workarounds like restarting pingwatch every night (I wanted to find out how to write systemd service units for it anyway), but maybe there is something in the go code that could be optimized to not have this happen?

Thanks

@fazalmajid
Copy link
Owner

Thanks for reporting the memory leak, I'll see what I can find out.

fazalmajid added a commit that referenced this issue Dec 1, 2020
@fazalmajid
Copy link
Owner

OK, I found a pretty dumb memory leak, not sure if it's the only one.

@aslmx
Copy link
Contributor Author

aslmx commented Dec 3, 2020

Cool Thanks! I'll keep an eye on it and report back if it leaks again.

@aslmx
Copy link
Contributor Author

aslmx commented Dec 16, 2020

It did not "escalate" yet, however, memory usage rose significantly from starting the application (~12MB) and having it running for 2 weeks (~180MB).

I'll keep monitoring ;)

memlog.log

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants