Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"Max open files" for working process

Tags:

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

like image 695
wako Avatar asked Sep 17 '10 11:09

wako


People also ask

How many files can a process open?

Linux systems limit the number of file descriptors that any one process may open to 1024 per process. (This condition is not a problem on Solaris machines, x86, x64, or SPARC).

What is too many open files?

The "Too many open files" message means that the operating system has reached the maximum "open files" limit and will not allow SecureTransport, or any other running applications to open any more files. The open file limit can be viewed with the ulimit command: The ulimit -aS command displays the current limit.

How do you find Max files a process has open Linux?

You can find the limit for a process with pid in /proc/<pid>/limits and there is an entry Max open files .

How many files can open in Windows?

By default, up to 512 files can be open simultaneously at the stream I/O level. This level includes files opened and accessed using the fopen , fgetc , and fputc family of functions. The limit of 512 open files at the stream I/O level can be increased to a maximum of 8,192 by use of the _setmaxstdio function.


1 Answers

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 running process to 4096:

prlimit -n4096 -p pid_of_process

like image 99
rkachach Avatar answered Oct 07 '22 01:10

rkachach