all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* setting open files limit for daemon processes
@ 2022-02-25  7:55 Attila Lendvai
  2022-02-25 10:42 ` Maxime Devos
  0 siblings, 1 reply; 5+ messages in thread
From: Attila Lendvai @ 2022-02-25  7:55 UTC (permalink / raw)
  To: guix-devel

dear Guix'ers,

"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`

and yet, when i `herd stop` and `herd start` the process, even though it's running with the right uid, its limit is still the default, as per:

cat /proc/[pid]/limits

the suggested solution i find online is to edit:

/etc/pam.d/common-session-noninteractive

to include:

session required pam_limits.so

but this is not how Guix arranges things.

i looked into extending my service (https://github.com/attila-lendvai/guix-crypto/blob/main/src/guix-crypto/services/swarm.scm) to add some pam rules, but i'd need to learn a whole lot of pam for that, and the Guix code around service extensions is also rather complex, so i decided to ask here:

is there an example somewhere demonstrating how to increase the open file limit of a daemon process?

any hints/guidance is appreciated.

--
- attila
PGP: 5D5F 45C7 DFCD 0A39n


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-02-25 23:33 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-25  7:55 setting open files limit for daemon processes Attila Lendvai
2022-02-25 10:42 ` Maxime Devos
2022-02-25 14:09   ` Attila Lendvai
2022-02-25 21:28     ` Attila Lendvai
2022-02-25 22:04       ` Maxime Devos

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.