Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Fix with ulimit -n 8192

Tags:

linux

caddy

Running caddy on a linux machine, and I receive the following error:

WARNING: File descriptor limit 1024 is too low for production servers.
         At least 8192 is recommended. 

         Fix with "ulimit -n 8192"

Ok, great. But where do I fix it?

like image 757
Chris Avatar asked Apr 03 '18 14:04

Chris


1 Answers

For a temporary fix, you can simply issue the command ulimit -n 8192.

For permanent you need to modify /etc/security/limits.conf.

For more details please refer below:

https://singztechmusings.wordpress.com/2011/07/11/ulimit-how-to-permanently-set-kernel-limits-in-linux/

From article:

vi /etc/security/limits.conf

Add two lines for each limit:

* soft nofile 16384
* hard nofile 16384

like image 131
Rehan Azher Avatar answered Oct 18 '22 21:10

Rehan Azher