1 頁 (共 1 頁)

[ulimit]增加連線數

發表於 : 2010-08-17 11:49:30
schumi
from http://www.ubun2.com/question/433/how_s ... ound_error

If you are root, execute the command below

代碼: 選擇全部

ulimit -SHn 65535
If you want to set it permanently, especially for a particular user, change the file /etc/security/limits.conf to have the following lines (assume user = www-data)
E.g.

代碼: 選擇全部

www-data hard nofile 65535
www-data soft nofile 65535
And make sure uncomment pam_limits.so from the different files under /etc/pam.d, e.g. sudo, login, sshd, ...
Finally restart your system
Source:

http://www.linuxask.com/questions/incre ... escriptors

Re: [ulimit]增加連線數

發表於 : 2010-08-31 17:20:10
schumi
from http://ir.org.tw/Wiki.jsp?page=Nturinst ... 8620100119

Q48. Linux主機若出現IOException: Too many openfiles應如何處理? (2010/01/19)

開檔的部分是因為系統在紀錄及檢查造訪者ip等動作, 都是利用檔案的方式進行。
Linux系統預設開檔上限預設為1024,需加大開檔上限,詳細方法可參閱相關文件
建議可以

cat /proc/sys/fs/file-max



ulimit –a

看看目前的值。