Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
在linux机器上运行caddy,我收到以下错误:
caddy
WARNING: File descriptor limit 1024 is too low for production servers. At least 8192 is recommended. Fix with "ulimit -n 8192"
好,很好。但是我在哪里修呢?
对于临时修复,您可以简单地发出命令ulimit -n 8192。
ulimit -n 8192
对于永久,您需要修改/etc/security/limits.conf.
/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
vi /etc/security/limits.conf
为每个限制添加两行:
* soft nofile 16384 * hard nofile 16384
* soft nofile 16384
* hard nofile 16384