ulimit provides control over the resources available to the shell and to processes started by it, on systems that allow such control
Questions tagged [ulimit]
79 questions
109
votes
7 answers
Increase the maximum number of open file descriptors in Snow Leopard?
I am trying to do something that requires a large number of file descriptors
sudo ulimit -n 12288 is as high as Snow Leopard wants to go; beyond this results in
/usr/bin/ulimit: line 4: ulimit: open files: cannot modify limit: Invalid argument.
I…
Chris Poole
- 1,879
73
votes
5 answers
Cannot Increase open file limit past 4096 (Ubuntu)
I'm on Ubuntu 17.04. Trying to increase the open file limit, and none of the instructions I've found online are working. I can go up to 4096, but can't go past that.
$ ulimit -n
1024
$ ulimit -n 4096
$ ulimit -n
4096
That works. This doesn't:
$…
mkasberg
- 2,693
48
votes
4 answers
How to change default ulimit values in Mac OS X 10.6?
Mac OS X limits number of processes to 266 and open files to 256. Sometimes this is problem; 256 open files and 266 processes aren't that much.
How it's possible to change default ulimit values in Mac OS X 10.6.7?
(Hopefully there's no difference…
Olli
- 7,739
33
votes
2 answers
modify and apply limits.conf without reboot
I have added a line in /etc/security/limits.conf to increase the number of open files.
* hard nofile 4096
root hard nofile 16384
However when I run ulimit -n it says 1024 which is the default value. I did a logout and login but still see 1024.…
mahmood
- 1,365
28
votes
2 answers
setting ulimit on a running process
I launched a server application and I want to run it for a long time for testing purpose. Unfortunately, I forgot to set before ulimit -c unlimited to catch an eventual crash and inspect it. Is there something I can do?
Lorenzo Pistone
- 454
23
votes
3 answers
Open files limit does not work as before in OSX Yosemite
I just updated the Mac OS X to Yosemite, and now some applications do not work (IBM DB2). I know that I need to set the Open Files to 65000, however the command does not work.
Andress-MBP:~ root# ulimit -n 12288
Andress-MBP:~ root# ulimit -n…
AngocA
- 344
22
votes
2 answers
Make ulimits work with start-stop-daemon
I have an init.d script that starts an app using start-stop-daemon --chuid SOME_SYSTEM_USER. That is, the app runs under a different user, not root.
Problem is, the app needs special limit settings (namely ulimit -n 64000), which I set in…
user124114
- 563
20
votes
3 answers
How do I check the ulimit for another user and change open files?
I have a process running as the gearman user and I want to change open files to avoid getting this nasty error:
ERROR 2014-09-12 17:49:14.000000 [ main ] accept(Too many open files) -> libgearman-server/gearmand.cc:788
How can I run ulimit as…
Tony
- 301
13
votes
2 answers
What parameters does ulimit have?
I see in examples that the -u option is used with the ulimit command, but I cannot find documentation that says what that option means. man ulimit shows the manual for a system library function. What options does ulimit have and what do they mean?
Mnementh
- 976
9
votes
2 answers
Why ulimit doesn't work when run with sudo?
Well..
$ ulimit -s
8192
$ sudo ulimit -s 16384
$ ulimit -s
8192
Why does ulimit disrespect me in such a barbaric way?
ntl0ve
- 201
9
votes
4 answers
How do I increase the max open files in macOS Big Sur?
I have heard
sudo launchctl limit maxfiles 64000 unlimited
And
conf=/etc/sysctl.conf
if sudo cat $conf | command rg kern.maxfiles ; then
ecerr "kern.maxfiles is already set in $conf"
else
sudo echo…
HappyFace
- 1,389
8
votes
1 answer
strange behaviour with ulimit on Mac OS X 10.6
I get some very strange behaviour when working with ulimit.
I just open up a new shell
Hector:~ robertj$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f)…
robertj
- 383
8
votes
3 answers
ulimit not limiting memory usage
When writing program, there are times when a runaway program slurps half of my RAM (generally due to practically infinite loops while creating large data structures), and bringing the system to become really slow that I can't even kill the offending…
Lie Ryan
- 4,517
- 3
- 25
- 27
7
votes
1 answer
Mac os x 10.7.4 process limit
I have a 709 max user process. I want to double it, or more.
First: ulimit
> ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory …
Marcel Falliere
- 173
7
votes
1 answer
Why doesn't ulimit -n work when called inside a script?
This is very odd. I'm trying to set the ulimit to 60000 via my startup.sh:
#!/bin/bash
ulimit -n 60000
echo "Hello! File Descriptor set"
I can execute this with ./startup.sh (755 file permissions) and the echo line is printed, and no errors are…
John Miller
- 73