-
Incident report
-
Resolution: Hardware failure
-
Trivial
-
None
-
5.4.6, 5.4.7
-
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.