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

Memory leak in postgresql_extensible #3807

Closed
phemmer opened this issue Feb 19, 2018 · 2 comments
Closed

Memory leak in postgresql_extensible #3807

phemmer opened this issue Feb 19, 2018 · 2 comments
Labels
area/postgresql bug unexpected problem or unintended behavior
Milestone

Comments

@phemmer
Copy link
Contributor

phemmer commented Feb 19, 2018

Bug report

Relevant telegraf.conf:

[[postgresql_extensible]]
[[inputs.postgresql_extensible.query]]
    sqlquery="SELECT 1"

System info:

telegraf 1.5.2

Steps to reproduce:

  1. run telegraf
  2. for a long time

Expected behavior:

Memory usage to be stable

Actual behavior:

Memory usage grows unbounded over time

Additional info:

The issue is due to line 186.
This has already been addressed by #2701, but since this change was a feature, and not targeted specifically at this issue, it will not be present until the next major release (1.6). I'm not sure what the timeframe is for 1.6, but if there are going to be any further 1.5 releases, I think a fix for this issue should be included. The fix is as simple as p.AllColumns = nil at the top of the Gather() func.

@danielnelson danielnelson added this to the 1.5.3 milestone Feb 20, 2018
@danielnelson danielnelson added bug unexpected problem or unintended behavior area/postgresql labels Feb 20, 2018
@danielnelson
Copy link
Contributor

danielnelson commented Feb 20, 2018

I added this, can you check it? 8147d60

I'm going to be out of office after wednesday for about a week so I will probably do 1.5.3 early March.

@phemmer
Copy link
Contributor Author

phemmer commented Feb 21, 2018

I think you linked the wrong commit. d8dae1b looks to be the right one, and yeah, that should do it. Thanks :-)
We put a cgroup memory limit on telegraf so it gets killed if it uses more than 128mb. Dirty, but will hold us over until the next release.

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/postgresql bug unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants