Limit of open files for the init (pid 1) process and its children?
Colin Watson
cjwatson at ubuntu.com
Fri Apr 8 13:53:56 UTC 2016
On Fri, Apr 08, 2016 at 01:26:55PM +0200, RafaĆ Radecki wrote:
> and I would like to set a different value for "Max open files" for init
> (pid 1) process so that all child processes (I need it for scripts from
> /etc/init/*.conf files) will inherit it. Is there a way to change this for
> init itself?
>
> I know that I can use ulimit command in start scripts of the children
> processes, and I can use /etc/security/limit.conf after properly
> configuring pam. But at the moment I need this functionality for processes
> spawned directly by init from /etc/init/*.conf. Can this be done?
There's no way to set it for the entire init daemon without hacking its
source directly. However, you can set it for processes spawned directly
from individual Upstart jobs by adding "limit nofile SOFT HARD", where
SOFT and HARD are either integers or "unlimited".
--
Colin Watson [cjwatson at ubuntu.com]
More information about the ubuntu-users
mailing list