Icinga2 too many open files

In case your problem persists, could you show the content of the following:

  • /proc/sys/fs/file-max
  • /proc/sys/fs/file-nr
1 Like

root@icinga:/var/log# cat /proc/sys/fs/file-max
root@icinga:/var/log# cat /proc/sys/fs/file-nr
2048 0 500000

so we are able to set the root users’ limit via command line.

however nothing we do changes the limit for wither the nagios user or the icinga process.

Running out of ideas here as the systemd changes we found is also not having any effect.

systemd changed parameter names and limits over the past versions, maybe your specific systemd version is affected. I would consult its manual for this very version.

ok so aftr investigating this myself, I found the server is in fact not running systemd…

So what are you running anyway? Centos6?

I still stand by creating a file in limits.conf


with content:
nagios soft nofile 65535
nagios hard nofile 65535

1 Like

we are running on ubuntu 14.04 as per my original post.

We have tried that as well but did not take effect.

Busy looking into something quickly though.

will post results after the change soon


we have in our infrastructure the same issue. We running two Icinga2-servers (CentOS 7) with version icinga2-2.13.2-1 installed.

We increased the open file limit for the system to 65535
and under the /etc/sysconfig/icinga2 the RLIMIT also to 65535.

But increasing the file limits doesn´t solved the problem, because the openfiles only increase then to the next open file limit. After restart of icinga2-service the open files are cleaned, but only till the limit is reached again.

what we found out is that the established connections between the icinga-server and the clients are not closed.

for example:

sudo netstat -antp | grep icinga2

tcp        0      0 xx.xxx.xxx.xx:5665      xx.xxx.xxx.xxx:35146    ESTABLISHED 109943/icinga2
tcp        0      0 xx.xxx.xxx.xx:5665      xx.xxx.xxx.xxx:38910    ESTABLISHED 109943/icinga2

is there a possibilty to set a timeout for the connections or has to be fixed in the softwarepackage ?