Increase Maximum open file in Linux

It is important for a production server to set the maximum open file limit as you might get over limit on your web services, database services, email services, and etc.

First of all, you may list the maximum of open file limit as command below.
cat /proc/sys/fs/file-max

Then you may increase the file description limit as command below.
sysctl -w fs.file-max=150000

The above command force the kernel to limit the maximum open file limit but you will need to perform the change from /etc/sysctl.conf in case the setting change after a reboot.
vi /etc/sysctl.conf

Append the setting as below.
fs.file-max = 150000

Then save it and run the command as below.
sysctl -p

Published by

Mick Genie

Mick Genie is the founder of and working at ExaBytes Network Sdn Bhd and WPWebHost web host company. He is expertise in Windows and Linux environment especially web hosting related information, tips and trick as well as the IT Information.

2 thoughts on “Increase Maximum open file in Linux”

Comments are closed.