Changing number open files on ec2 instance

Go To StackoverFlow.com

0

I'm using 32bit Amazon Linux (Centos?). Per the blog http://gnufreakz.wordpress.com/2009/08/12/increase-ulimit-in-centos/ I tried changing some parameters.

I added the below line to /etc/sysctl.conf

fs.file-max = 65536

and ran sysctl -p

I added the below line to /etc/security/limits.conf

*   hard    nofile  65536

No luck! After a restart, ulimit -a still gives me:

core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 26597
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) 1024
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited
2012-04-04 05:09
by nflacco


2

Try adding

ulimit -n 65536

to your /etc/profile or to /home/[username]/.bash_profile

2012-04-04 05:33
by BluesRockAddict
-bash: ulimit: open files: cannot modify limit: Operation not permittedMeekohi 2014-12-10 15:38
@Meekohi - get your admin to update /etc/security/limits.conf to increase the setting for you - Paul Jowett 2018-02-09 10:36
Ads