checkmk - increase limit for open files

<home-directory of your site>/etc/init.d/cmc

here you find under start:

>> # Try to raise the soft limit for open files. The Microcore needs a *lot* of open
>> # files when you have a large number of helper processes and/or Livestatus threads
>> # configured. Setting the soft limit to "unlimited" (i.e. the hard limit) is not a
>> # good idea, this limit can be very high (1 M), which negatively impacts closefrom().
>> for i in 8192 6144 4096 2048; do # find a sane soft limit below the hard one
>> ulimit -S -n $i 2> /dev/null && break
>> done


>> add a 16384 before 8192 and restart your site

>> if you update to a new version, you need to check if the setting is still there ;-((


how to make sure which are the real values?
>> create a script and use it as individual check, in the script dump the limit parameters, using the command ulimit -a

>> here is such sample script, that writes the values to /tmp/ulimit.log
#!/bin/perl
system("ulimit -a >> /tmp/ulimit.log");
print "<<<check_mk>>>\n";
print "Version: pn-v2022-09-13\n";
print "<<<local>>>\n";
print "0 ulimit-openfiles - just for debug, write values to /tmp/ulimit.log\n";

computer2know :: thank you for your visit :: have a nice day :: © 2024