Setting open file limits

Here is a post on my notes for setting open file limits


The error message you get is

“Too many open files”,
And the way to take a look current limit is
ulimit -n (this will give you current max limit)
There is a “soft limit” and a “hard limit”,
on Lanka the soft limit is 1024, that is
ulimit -Sn
the “hard limit” is 4096, you can see the hard limit with the command
ulimit -Hn
To set the soft limit is easy, but it has to be a number between 0 — hard limit, just do
ulimit -n 4096,
this would set the soft limit to 4096, now you can run with more files
It is tricky to set the hard limit. Googling around shows that you can potentially do this by


This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

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

You are commenting using your 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