Some times we faced issue some think like “
Check Current Open File Limit
Q. How to check current open file limit in Linux system ?
A. Use following command to check open file limit in Linux system.
# cat /proc/sys/fs/file-max 50000
Increase Open File Limit in Linux
We can increase open file limit temporarily or permanently as per our requirement. If we need changes just for testing, then increase limit temporarily.
Temporarily Increase Open File Limit
Q. How to increase open file limit in temporarily on Linux system ?
A. Use one of following commands to temporarily increase open file limit on Linux system. These setting will lost after system reboot.
# sysctl -w fs.file-max=500000 [or] # echo "500000" > /proc/sys/fs/file-max
Permanently Increase Open File Limit
Q. How to increase open file limit in permanently on Linux system ?
A. Edit /etc/sysctl.conf and append following configuration to permanently increase open file limit on Linux system. These setting will remain even after system reboot.
# vim /etc/sysctl.conf
fs.file-max = 500000
after appending configuration in file execute following command to changes take effect.
# sysctl -p