1

Centos 5.9 I have set the below in /etc/security/limits.conf but when mMonit starts my processes the ulimit is still 1024. If I do ulimit -a it correctly shows 500000 as max open files. In /etc/sysctl.conf I have fs.file-max = 512000. Also root is the use that Monit is using to start the processes. I have rebooted and have the same issue.

*         hard    nofile      500000
*         soft    nofile      500000
root      hard    nofile      500000
root      soft    nofile      500000

* - nofile 655350

If I look at the process that Monit is managing I get:

[root@server1 ~]# cat /proc/8940/limits
Limit                     Soft Limit           Hard Limit           Units
Max cpu time              unlimited            unlimited            seconds
Max file size             unlimited            unlimited            bytes
Max data size             unlimited            unlimited            bytes
Max stack size            10485760             unlimited            bytes
Max core file size        0                    unlimited            bytes
Max resident set          unlimited            unlimited            bytes
Max processes             257124               257124               processes
Max open files            1024                 1024                 files
Max locked memory         32768                32768                bytes
Max address space         unlimited            unlimited            bytes
Max file locks            unlimited            unlimited            locks
Max pending signals       257124               257124               signals
Max msgqueue size         819200               819200               bytes
Max nice priority         0                    0
Max realtime priority     0                    0
2

I needed to set ulimit -n 500000 in the init file.

1
  • 2
    It's probably obvious to most but I believe he is referring to the /etc/init.d/monit file as that is what we needed to change.
    – Paul
    Jan 8 '19 at 22:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.