Linux – Making open file descriptor limit unlimited in Debian

debiandebian-jessielinuxunix

I am doing a perf test of one of my API. After some time I keep getting the error Too many open file. Once I increase the number of open file descriptor (ulimit -Hn, ulimit -Sn & cat /proc/sys/fs/file-max) then the request / sec my API can server increases. But then again the too many open file descriptor error comes.

Can someone let me know if it is possible to set the open file descriptor limit to unlimited so that I don't want to increase the value every time and just know what is the breaking limit of the API assuming I have sufficient file descriptor.

I am using Debian 8.

Best Answer

To set unlimited: ulimit -u unlimited