I've been meaning to ping the list about this for months.

Since supervisord is a process manager that often runs as root, I see
no reason to not task it with process setup for various rlimits.
- num procs..thread hungry java processes need this
- num files..any server needs raised file descriptor limits
- stack size ...we use this for super threaded mongod to cut down on
memory usage
- others?

Instead of relying on /etc/security/limits.d or limits.conf and an
interactive pam session to enact those on a per-user basis, I want the
server I'm starting that requires root privs to know how and what it
should set it to. nginx and haproxy both do this well.

Supervisord running as root, which it often is, is well positioned to
parse the program specific values, upon fork but before the exec,
calling setrlimit to set up the correct 'space' for the program to run
inside of. Since we needed this so badly, I patched our supervisord to
allow a program to specify:
minfds=
minprocs=
stacksize=

It's worked well, but the patch is a grotesque copy and paste of code
borrowed from the supervisord parent process and config setup. We
can't live without it at this point, so we continue to patch on
updated versions of supervisord which is a royal PITA.

Does anybody else need or want this?
_______________________________________________
Supervisor-users mailing list
[email protected]
http://lists.supervisord.org/mailman/listinfo/supervisor-users

Reply via email to