0

I see that different users in my Debian system has different max open files limits. I read the post but would like to get some understanding of the details. I do not have any settings into /etc/security/limits.conf but:

mysql seems to follow kernel values:

Max open files            1024                 4096

redis has different values:

Max open files            4096                 4096

Does it raise it by default with setrlimit call?

root has another values:

Max open files            65536                65536

Are the special root values hardcoded somewhere or where should I seek for the settings?

origaminal
  • 101
  • 2
  • 1
    Do you have /etc/security/limits.d/*? Also Is there a init script or something else getting called during start up? If it is application specific maybe it could be set during the start up of that service. – Tux_DEV_NULL Jan 26 '18 at 11:09
  • No, this folder is empty but at least found out in redis logs that it raises the soft limit on its own. – origaminal Jan 26 '18 at 12:14

1 Answers1

0

Does it raise it by default with setrlimit call?

Probably. Applications may attempt to change their limits with that call.

On Linux, increasing above the hard limit requires CAP_SYS_RESOURCE privilege, see the man page. In practice, this means that running init scripts as root allows them to exceed this kind of resource limit.

John Mahowald
  • 30,009
  • 1
  • 17
  • 32