6

在linux机器上运行caddy,我收到以下错误:

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

         Fix with "ulimit -n 8192"

好,很好。但是我在哪里修呢?

4

1 回答 1

9

对于临时修复,您可以简单地发出命令ulimit -n 8192

对于永久,您需要修改/etc/security/limits.conf.

更多详情请参考以下:

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

来自文章:

vi /etc/security/limits.conf

为每个限制添加两行:

* soft nofile 16384
* hard nofile 16384

于 2018-04-03T14:35:07.340 回答