開發反饋某測試機重啟後無法登入,本地與遠端 SSH 均失效。
/etc/passwd:無異常/etc/profile:正常開發曾嘗試設定最大開啟檔案數,檢視 /etc/security/limits.conf 發現:
* soft nofile 6553500
* hard nofile 6553500
設定值過大(6553500 遠超系統限制),導致登入程序無法正常初始化資源。
註釋掉上述兩行設定,重啟系統,登入恢復正常。
limits.conf 中 nofile 參數不宜設定過大,建議參考系統預設值(通常 65535 或 1048576)。