Skip to content
Advertisement

Tag: ulimit

How to reproduce “Too Many open files” error in Shell

Assume that my open file limit is 1024 per process, Then how to reproduce Too Many open file error in shell script? I tried above, but it opens 10 files in 10 different processes. Answer You can use ulimit -n to set the maximum number of open files to a low number, and then open up more than that number

linux ulimit with java does not work properly

I run code on linux ubuntu 17.10 this code returns “unlimited” but whenever I run command from terminal I get 1024. Why those numbers are different? Answer You get the same result if you run the same command from the command line: This is because -c only looks at the argument immediately following it, which is ulimit. The -n is

Advertisement