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

Best way to set maximum number of open descriptors for a process



Hi!

I would like to set the maximum number of open descriptors for a
specific process in a way that is maintainable.

I've tried putting something like this in /etc/security/limits.d/:

jvb    soft    nofile   10240
jvb    hard    nofile   10240

But this seems to only apply to processes with an active shell in the
system:

----------------------------------------------------------------------------
root@conference:~# cat /etc/security/limits.d/jitsi-meet.conf
jvb     soft    nofile  10240
jvb     hard    nofile  10240
----------------------------------------------------------------------------
root@conference:~# ps -u jvb | tail -1 | awk '{ print $1 }'
434
----------------------------------------------------------------------------
root@conference:~# cat /proc/434/limits | grep open
Max open files            4096                 4096                 files
----------------------------------------------------------------------------
root@conference:~# su - jvb
jvb@conference:~$ ulimit -n
10240
----------------------------------------------------------------------------

Maybe I could add something to the startup script, but maybe if the
Debian package is updated, these changes will be lost. What do you
suggest is the best way?


Thanks in advance.

Kind regards,
Daniel

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: