Code Monkey home page Code Monkey logo

Comments (10)

cavaliercoder avatar cavaliercoder commented on June 12, 2024

Duplicate of #16 fixed in v0.2.1.

If you are using >0.2.1 version and the problem persists, please reopen the issue and provide the following:

  • Where you installed from (tar ball, rpm, git, etc.)
  • The last query on each of the leaked connections select query from pg_stat_activity;

from libzbxpgsql.

karlsoon avatar karlsoon commented on June 12, 2024

I use git master.
Before this reply i used updated version by 'git pull' from old release.
But after start this issue, i removed .so from /usr/local/lib, stop zabbix-agent, do git clone and build .so again. After start of zabbix-agent there is grow again.
Cannot attach requested info, so, please see it at http://pastebin.com/yR851Sy5

Just to clarify: i get mistake.
Trunk is analog of master branch in SVN terminology.

from libzbxpgsql.

cavaliercoder avatar cavaliercoder commented on June 12, 2024

Thanks, that's perfect. It looks like it's leaking the same connection I fixed in v0.2.1 so I'm a little confused, but we'll take a close look.

Apologies as I should have asked before, can you please provide the following:

  • Zabbix server version
  • Zabbix agent version
  • PostgreSQL server version
  • PostgreSQL libs version used by agent module
  • Result of zabbix_get -s 127.0.0.1 -k pg.modver

from libzbxpgsql.

karlsoon avatar karlsoon commented on June 12, 2024

Zabbix server is 2.4.5(also on postgresql DB, but monitoring for another server. i do not monitor PGsql on zabbix server);
Zabbix agent is 2.4.5;
PostgreSQL server - 9.4.4
PostgreSQL libs - i think is the same version. How to check it?
On zabbix_get -s 127.0.0.1 -k pg.modver on server that monitored - nothing returned.
But if i run zabbix_get -s 10.48.107.12 -k pg.modver from zabbix server, there is:
libzbxpgsql 0.2.1

from libzbxpgsql.

cavaliercoder avatar cavaliercoder commented on June 12, 2024

The last query on most of the backends in your pastebin appears to be for items pg.index.discovery and pg.table.discovery, both of which use the new 'wide' discovery feature by calling pg_get_discovery_wide(). I suspect this may be the issue but there is no obvious leak. I'll dig in a little further and advise.

Are you explicitly using the shallow parameters for those discovery items or just the default deep mode?

from libzbxpgsql.

cavaliercoder avatar cavaliercoder commented on June 12, 2024

Should be fixed in 140f060. Please test and advise :)

from libzbxpgsql.

karlsoon avatar karlsoon commented on June 12, 2024

i dont know what it is mean:
"Are you explicitly using the shallow parameters for those discovery items or just the default deep mode?"
Anyway, i will update again to master, build it and test.

from libzbxpgsql.

cavaliercoder avatar cavaliercoder commented on June 12, 2024

It's not documented yet, but you can specify 'shallow' discovery for index and table discoveries. This causes the agent to only discover items on the current connected database. If you use the 'deep' discovery (the new default), the agent will discover items in all connectable databases on the database server. If you haven't specified it will be defaulting to deep discovery which is where I found a connection leak.

from libzbxpgsql.

karlsoon avatar karlsoon commented on June 12, 2024

I do not change any behavior.
Also, i think the problem is gone with current master branch.
new-pgsql

from libzbxpgsql.

cavaliercoder avatar cavaliercoder commented on June 12, 2024

Excellent thank you!

from libzbxpgsql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.