close

轉自 https://exfast.me/2018/11/linux-solution-appears-too-one-to-many-file-problem/

--

最近把 exfast.Helper 移植到 Linux 上面,發現錯誤 LOG 常常噴 One or more errors occurred. (Too many open files in system),查了一下發現原來 Linux 有限制檔案開啟的數量。

 

  • 查詢目前的環境參數  
    上面可以看到 open files (-n) 1024 代表了最大允許開啟檔案數量是 1024
  • 暫時調整 open files (重開機會還原預設值 1024)
  • 永久改變必須修改 sudo vim /etc/security/limits.conf

     

    • soft 是設定軟體資源限制
    • hard 是設定硬體資源限制
    • * 是代表所有使用者

--

arrow
arrow
    全站熱搜

    dizzy03 發表在 痞客邦 留言(0) 人氣()