0

I want to add open files limit to HAProxy 1.8 process to 1024576. But since I use version 1.8, I cannot add LimitNOFILE to init scripts, instead of systemd file. How can I add limitNOFILE to those processes ?

*P.S: I had changed openfile on /etc/security/limits.conf, /etc/security/limits.d/20-nbproc.conf and also set ulimit -n to 1024576 and sysctl -p fs.file-max=1024576. But when I do "cat /proc/{pid}/limits", the open files still 4096.

alexander.polomodov
  • 1,068
  • 3
  • 10
  • 14

1 Answers1

0

You will need to edit the init script and use ulimit to increase the limit along with making the sysctl changes permanently. See this answer for why changing limits.conf won't work.

bodgit
  • 4,751
  • 16
  • 27