Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a process (java program)that require many temporary files. There is limit set that we cannot have more than 1024 open descriptors. How do I increase "open files" limit for process from 1024 to 10240 I can reduce the value.. not increase it. The following works.

ulimit -n 899 

The following does not work

ulimit -n 1025
share|improve this question
If you "need" to have that many temp files open all at the same time you're probably doing it wrong™ – Chris S Oct 15 '10 at 12:28
Agree. 'definitely' wrong. – Jayan Oct 22 '10 at 4:22
up vote 6 down vote accepted

You will need root access to increase it. If you're using Ubuntu (also works for other distros):

If you're using bash, the command is 'ulimit -n'. To change the limit permanently edit /etc/security/limits.conf (your distro may use a different location).

For a list of all options, use -a:

$ ulimit -a
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 20
file size               (blocks, -f) unlimited
pending signals                 (-i) 16382
max locked memory       (kbytes, -l) 64
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
share|improve this answer
It works to reduce the value- -- cannot increase from my use account (Thanks, I update the question) – Jayan Oct 13 '10 at 10:28
That works in many linux flavours. Could you write that as answer :) – Jayan Oct 14 '10 at 4:35

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.