UnixServerAdmin

Server Administration & Management

How to 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

Advertisements

April 6, 2011 - Posted by | Tips & Tricks, Unix/Linux | , ,

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: