"Too many open files (24)"
Pernah kene? Dah ko scan x beragak..hahaha. Tue sebab ko dah cecah limit. Run cmd as root, Jom cek brape limit korang dengan cmd:cat /proc/sys/fs/file-max
Default aku:
209708
Check Hard Limit:
ulimit -Hn
Default aku:
1048576
Check Soft Limit:
ulimit -Sn
Default aku:
1024
Per-User Limit:
cat /etc/security/limits.conf
1. edit
/etc/security/limits.conf
, aku letak 500k mcm dibawah:* hard nofile 500000
* soft nofile 500000
root hard nofile 500000
root soft nofile 500000
2. Edit
sysctl.conf
fail yg aku post sebelum nie, sblum tue ko cek dulu:cat /proc/sys/fs/file-max
cat /etc/sysctl.conf | grep fs.file-max
ubah:
fs.file-max=500000
Cun! Jgn lupe run
sysctl -p
utk reload bila korang dah usik sysctl.conf nie.Last step,
3. Edit fail nie:
/etc/pam.d/common-session
Tambah line nie:
session required pam_limits.so
seperti dibawah:Reboot and enjoy~!
Rujukan:
https://easyengine.io/tutorials/linux/increase-open-files-limit/
https://www.tecmint.com/increase-set-open-file-limits-in-linux/
https://docs.oracle.com/cd/E19623-01/820-6168/file-descriptor-requirements.html
No comments:
Post a Comment