guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setting open files limit for daemon processes


From: Maxime Devos
Subject: Re: setting open files limit for daemon processes
Date: Fri, 25 Feb 2022 11:42:27 +0100
User-agent: Evolution 3.38.3-1

Attila Lendvai schreef op vr 25-02-2022 om 07:55 [+0000]:
> "The per-process limit is inherited by each process from its parent",
> and Shepherd is the init process. when it spawns a daemon, it inherits
>  its open files limit.
> 
> i have successfully set the limit for the daemon user using:
> 
> (pam-limits-service
>   (list
>     (pam-limits-entry "*" 'both 'nofile 100000)))
> 
> and it is applied as observable with:
> 
> su - [daemon user] -c 'ulimit -aHS' -s `which bash`

That might set the limit of the user when that user logins (and hence,
PAM things are run), but I don't see how this changes the limit of
shepherd itself.  I don't think that shepherd interacts with PAM at
all?

My suggestion is to do (setrlimit RLIMIT_NOFILE [...]) inside shepherd
itself -- when shepherd starts, or between 'fork' and 'exec'.  Maybe
an '#:open-file-limit' argument could be added to 'fork+exec-command'?

Greetings,
Maxime

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]