Is it possible to increase "Max open files" parameter for working process ? I mean this parameter:
cat /proc/<pid>/limits | grep files
Thanks for your advices
Is it possible to increase "Max open files" parameter for working process ? I mean this parameter:
cat /proc/<pid>/limits | grep files
Thanks for your advices
Another option is to use the prlimit command (from the util-linux package). For example if you want to set the maximum number of open files for a process:
This link details how to change this system wide or per user.
As a system administrator: The
/etc/security/limits.conf
file controls this on most Linux installations; it allows you to set per-user limits. You'll want a line likemyuser - nofile 1000
.Within a process: The getrlimit and setrlimit calls control most per-process resource allocation limits.
RLIMIT_NOFILE
controls the maximum number of file descriptors. You will need appropriate permissions to call it.Yes, it is possible to increase the limits in
/proc/<pid>/limits
at run time. Just find the pid and execute below command:...works in RHEL5.5 and RHEL6.7.
Note that the "-n" is mandatory; a trailing newline will generate a complaint about invalid arguments.
The following commands give the max # of open files per process permissible by default limits (soft and hard respectively):
You can use a program or a command to change these limits. Look at ulimit (man ulimit).