-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
Memory leakage in SNMP input #4457
Comments
Can you run these? Letting it double in memory usage from base should be enough time before running.
|
Hi @danielnelson! I ran the commands towards the heapdump where the process had ran for several days. |
Can you do this one too? |
Contents pasted here: https://pastebin.com/i5S7bm5X Dumped at same time/run as the heap from above |
Some more follow up questions:
|
Can you also grab the full goroutine dump with |
@danielnelson Here you go: https://gist.github.com/Anderen2/7c2c1bfbd2d0960ef73120ae06a80db2 That is not from the same run as the others though, Telegraf have been running for 3 days here. |
Agent configuration:
|
@Anderen2 I have a couple theories about the cause, can you tell me approximately how frequently you reload these Telegraf via sending a SIGHUP or through your init system |
@danielnelson: Every hour. |
I think it may be leaking memory on reload. If you zoom in on memory used metric for a single Telegraf, and group by ~10m, do you see a stair step pattern every hour? |
It's difficult to separate the suspected leak from the background noise in the graphs. However, we have rewritten some of our stuff to avoid reloading Telegraf every hour. That seems to have slow down (or stopped) the growth rate, so your theory sounds reasonable. |
Relevant telegraf.conf:
Sample config: https://pastebin.com/x1qWYsYk
System info:
Telegraf v1.6.0 (git: release-1.6 9253f6f)
Red Hat Enterprise Linux Server release 7.5 (Maipo)
Steps to reproduce:
Expected behavior:
That the memory usage were consistent and not increasing over time.
Actual behavior:
Telegraf's memory usage seems to increase over time.
Additional info:
Graph showing increasing memory usage until the process restarts.
Newly started process
After running for several days
pprof png generated from
http://localhost:6060/debug/pprof/heap?debug=1
The text was updated successfully, but these errors were encountered: