Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-20173

Too many open files on DB PostgreSQL Agent 2

XMLWordPrintable

    • Icon: Incident report Incident report
    • Resolution: Hardware failure
    • Icon: Trivial Trivial
    • None
    • 5.4.6, 5.4.7
    • Agent2 plugin (N)
    • None
    • Centos 8 latest version, pgdg postgresql

      Steps to reproduce:
      Not sure if possible in other environments, always reproducible at least on two of my systems.

      Result:

      zabbix_agent2.log:

      2021/11/04 02:02:05.370175 [Postgres] Connection failed: failed to connect to `host=127.0.0.1 user=zbx_monitor database=postgres`: dial error (dial tcp 127.0.0.1:5432: socket: too many open files).
      2021/11/04 02:02:05.370234 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
      2021/11/04 02:02:05.370260 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
      2021/11/04 02:02:05.370277 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
      2021/11/04 02:02:05.370299 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files
      2021/11/04 02:02:05.378829 cannot accept incoming connection: accept tcp [::]:10050: accept4: too many open files

      and so on many times...

      But, if I change "127.0.0.1" to localhost in plugin variable, getting following one:

      2021/11/04 01:25:41.511492 [Postgres] Connection failed: failed to connect to `host=localhost user=zbx_monitor database=postgres`: hostname resolving error (lookup localhost: no such host).
      

      Note, that IPv6 is disabled. localhost can be resolved - hosts file is standard. nsswitch not changed.

      Changed open file limits with a much higher numbers - same result. In fact, Postgresql is accepting hundreds of connections without issues.

       

            dotneft Alexey Pustovalov
            giomac George Machitidze
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: