IT_man 發表於 2021-6-3 22:51:58

[crit] open() "/xxxx/yyyy/500.html" failed (24: Too many open files)

# 看目前系統設定的限制 (ulimit -a # 可查看全部參數)
ulimit -n
1024


# 由 limits.conf 設定 nofile (nofile - max number of open files) 的大小
vim /etc/security/limits.conf


# 增加/修改 下述兩行 ( 2^20 = 1048576 )
* soft nofile 1048576
* hard nofile 1048576


# 登出後, 再登入, 執行就會出現此值
ulimit -n
1048576
若 ulimit -n 沒出現 1048576 的話, 可使用強制設定


ulimit -n 1048576


# 再檢查設定
ulimit -n
1048576
頁: [1]
查看完整版本: [crit] open() "/xxxx/yyyy/500.html" failed (24: Too many open files)