Answer the question
In order to leave comments, you need to log in
Why does Linux have a limit on the number of open files?
Linux, and probably all other Unixes (correct me if I'm wrong) have a /proc/sys/fs/file-max file that has a ceiling on the number of open files.
I have three questions:
Answer the question
In order to leave comments, you need to log in
There is a limit on the number of open files in all operating systems, including Windows. And it is needed because a descriptor is created for each open file in a special memory area of the operating system kernel. This area is not unlimited, and if it is exhausted, the system can spill out into a crust . No one likes an operating system that you can fill up just by opening files and not closing them.
To prevent processes from opening files
Empirically
You can set limits in limits
This is a simple precaution and a deliberate rake for those developers who do not close file descriptors in their programs.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question