Debian – How to set ulimit value permanently

debianulimit

On Debian Wheezy, ulimit -a gives:

open files                      (-n) 1024

I add this to /etc/security/limits.conf

*                hard    nofile          64000

then reboot.

And ulimit -a still gives a maximum number of open files of 1024. Anyone could throw some light on it?

Best Answer

Option one: You did not set the softlimit higher aswell.

Possible solution:

in /etc/security/limits.conf add

* soft nofile 2048

test with

ulimit -n 2048 

Option two: You are logged in as user and in some "config" file (profile, bashrc, something like this) the soft limit is set to a lower value.

Possible solution f.e. grep for ulimit in your etc folder and/or home folder.

Warning: Depending on the amount of files/directorys you have in there you might want to consider only specific directorys/files

ps: there are a lot of similiar question here you might want to read up.

Specially Hard vs Soft Limit

Read here for possible other solution which go more into detail Too Many Open Files