Questions tagged [ulimit]

183 questions
79
votes
5 answers

Practical maximum open file descriptors (ulimit -n) for a high volume system

We recently began load testing our application and noticed that it ran out of file descriptors after about 24 hours. We are running RHEL 5 on a Dell 1955: CPU: 2 x Dual Core 2.66GHz 4MB 5150 / 1333FSB RAM: 8GB RAM HDD: 2 x 160GB 2.5" SATA Hard…
Kevin
  • 893
  • 1
  • 7
  • 5
52
votes
3 answers

Soft limit vs Hard limit?

Can anyone explain in layman's terms what the difference between soft and hard limit is? Should I set my soft and hard limit to be the same? Or should soft be significantly lower? Does the system benefit either way?
kidcapital
  • 777
  • 2
  • 7
  • 10
41
votes
8 answers

where are the default ulimit values set? (linux, centos)

I have two CentOS 5 servers with nearly identical specs. When I login and do ulimit -u, on one machine I get unlimited, and on the other I get 77824. When I run a cron like: * * * * * ulimit -u > ulimit.txt I get the same results (unlimited,…
nomercysir
  • 411
  • 1
  • 5
  • 4
39
votes
2 answers

How do ulimit -n and /proc/sys/fs/file-max differ?

I notice that on a new CentOS image that I just booted up off of EC2 that the ulimit default is 1024 open files, but /proc/sys/fs/file-max is set at 761,408 and I'm wondering how these two limits work together. I'm guessing that ulimit -n is a…
bantic
  • 1,469
  • 3
  • 14
  • 17
37
votes
5 answers

Set max file limit on a running process

I have a long running process that is eventually going to hit the max open file limit. I know how to change that after it fails, but is there a way to change that for the running process, from the command line?
kāgii
  • 471
  • 1
  • 4
  • 4
28
votes
7 answers

Where are the default ulimits specified on OS X (10.5)?

The default nofile limit for OS X user accounts seems to be about 256 file descriptors these days. I'm trying to test some software that needs a lot more connections than that open at once. On a typical Debian box running the pam limits module, I'd…
archaelus
  • 383
  • 1
  • 4
  • 5
25
votes
3 answers

How to set ulimit value permanently?

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.…
Icu
  • 1,405
  • 2
  • 15
  • 25
23
votes
3 answers

Too many open files with nginx, can't seem to raise limit

The server is Ubuntu 13.04 (GNU/Linux 3.9.3-x86_64-linode33 x86_64). nginx is nginx/1.2.6. I've been working on this for an several hours now, so here's what I'm getting and here's what I've done. tail -f /usr/local/nginx/logs/error.log 2013/06/18…
Geuis
  • 625
  • 3
  • 8
  • 17
21
votes
5 answers

ulimit -n not changing - values limits.conf has no effect

I am trying to raise the open file descriptor maximum for all users on an ubuntu machine. This question is somewhat of a follow up to this question. open file descriptor limits.conf setting isn't read by ulimit even when pam_limits.so is…
Abbas Gadhia
  • 323
  • 1
  • 3
  • 10
19
votes
2 answers

Increasing ulimit on CentOS

We have a CentOS box that I'm trying to increase the max number of files that a user can have open. Currently when I run ulimit -Sn I get 1024 and ulimit -Hn gives 4096. I need that number up around 6000. In /etc/sysctl.conf I've set fs.file-max =…
nwalke
  • 643
  • 2
  • 12
  • 31
19
votes
2 answers

/etc/security/limits.conf soft nproc limit appears to be ignored

My MongoDB database was running into problems under load, with the following errors spamming the logs: [initandlisten] pthread_create failed: errno:11 Resource temporarily unavailable [initandlisten] can't create new thread, closing connection I've…
John M
  • 333
  • 1
  • 3
  • 7
18
votes
9 answers

How to set ulimits for a service starting at boot?

I need, for mysql to use large-pages, to set a ulimit - I've done this in limits.conf. However, limits.conf (pam_limits.so), doesn't get read in for init, only for "real" shells. I solved this before by adding a "ulimit -l" to the initscript start…
jayofdoom
  • 191
  • 1
  • 1
  • 4
18
votes
2 answers

open file descriptor limits.conf setting isn't read by ulimit even when pam_limits.so is required

I am trying to raise the open file descriptor maximum for all users on an ubuntu machine. I've added the following lines to /etc/security/limits.conf: * soft nofile 100000 * hard nofile …
bantic
  • 1,469
  • 3
  • 14
  • 17
17
votes
1 answer

Ubuntu 16.04 Server MySql open_file_limit won't go higher than 65536

I'm running Ubuntu 16.04 Server on XenServer and I'm running into an issue with MySql's open file limit. Here's what I've done so far: sudo nano /etc/security/limits.conf (reference) * soft nofile 1024000 * hard nofile 1024000 * soft nproc 102400 *…
J Pierret
  • 171
  • 1
  • 1
  • 6
17
votes
2 answers

nginx uLimit 'worker_connections exceed open file resource limit: 1024'

I keep getting this error in nginx/error.log and its driving me nuts: 8096 worker_connections exceed open file resource limit: 1024 I've tried everything I can think of and cant figure out what is limiting nginx here. Can you tell what am I…
Neel
  • 1,421
  • 7
  • 21
  • 35
1
2 3
12 13