Werk #970: liveproxyd: handle situations with more then 1024 open files
Component | Livestatus proxy |
Title | liveproxyd: handle situations with more then 1024 open files |
Date | May 14, 2014 |
Checkmk Editon | Checkmk Raw (CRE) |
Checkmk Version | 1.2.5i3 |
Level | Prominent Change |
Class | Bug Fix |
Compatibility | Compatible - no manual interaction needed |
When you are using the Livestatus Proxy Daemon for connecting lots of sites and you have lots of concurrent users then two things could happen:
1. You might run out of allowed open files. The reason is that per default on most Linux systems the number of files a process is allowed to keep open is limited to 1024. The can be increased by changing /etc/security/limits.conf and issue a ulimit -S -n unlimited before starting liveproxyd. That latter one has now ben implemented in the recent development OMD builds of the Check_MK Monitoring System. The liveproxyd now also handles the out-of-files error situation better and does not long run into a busy CPU loop. It waits for 5 seconds and restarts itself instead.
2. Even if you increased the number of allowed open files, the liveproxyd could never handle more than 1024 open files on most Python versions (due to a limit of the system call select(). This has been fixed by using the poll() system call.