Questions tagged [ulimit]

ulimit gets or sets the upper limit for resources available to the current shell.

356 questions
79
votes
10 answers

How to increase Neo4j's maximum file open limit (ulimit) in Ubuntu?

Currently ulimit -n shows 10000. I want to increase it to 40000. I've edited "/etc/sysctl.conf" and put fs.file-max=40000. I've also edited /etc/security/limits.conf and updated hard and soft values. But still ulimit shows 10000. After making all…
theharshest
  • 7,767
  • 11
  • 41
  • 51
61
votes
3 answers

What does "ulimit -s unlimited" do?

There are understandably many related questions on stack allocation What and where are the stack and heap? Why is there a limit on the stack size? Size of stack and heap memory However on various *nix machines I can issue the bash command ulimit -s…
Brian Hawkins
  • 2,813
  • 2
  • 25
  • 17
56
votes
9 answers

how to set ulimit / file descriptor on docker container the image tag is phusion/baseimage-docker

I need to set the file descriptor limit correctly on the docker container I connect to container with ssh (https://github.com/phusion/baseimage-docker) Already tried: edit limits.conf the container ignore this file upstart procedure found at…
dnocode
  • 1,928
  • 1
  • 18
  • 21
46
votes
3 answers

Python: ulimit and nice for subprocess.call / subprocess.Popen?

I need to limit the amount of time and cpu taken by external command line apps I spawn from a python process using subprocess.call , mainly because sometimes the spawned process gets stuck and pins the cpu at 99%. nice and ulimit seem like…
Parand
  • 102,950
  • 48
  • 151
  • 186
46
votes
4 answers

How to increase ulimit on Amazon EC2 instance?

After SSH'ing into an EC2 instance running the Amazon Linux AMI, I tried: ulimit -n 20000 ...and got the following error: -bash: ulimit: open files: cannot modify limit: Operation not permitted However, the shell allows me to decrease this number,…
dmodulus
  • 1,003
  • 2
  • 9
  • 7
37
votes
3 answers

How to limit memory of a OS X program? ulimit -v neither -m are working

My programs run out of memory like half of the time I run them. Under Linux I can set a hard limit to the available memory using ulimit -v mem-in-kbytes. Actually, I use ulimit -S -v mem-in-kbytes, so I get a proper memory allocation problem in the…
hectorpal
  • 711
  • 2
  • 6
  • 15
36
votes
3 answers

Ulimits in Docker host vs container

I wasn't able to find straight answer, to this question, but here it is: Let's say that I have a host which has max open files 1024: [root@host]# ulimit -a open files (-n) 1024 and a docker container running in that host…
os11k
  • 1,210
  • 2
  • 13
  • 26
33
votes
2 answers

What does "ulimit -l" mean?

According to the manpage, "-l" in ulimit means "The maximum size that may be locked into memory". What does this sentence mean, exactly? How may it affect running programs?
Eric Yung
  • 733
  • 2
  • 6
  • 12
30
votes
3 answers

How do I close the files from tempfile.mkstemp?

On my machine Linux machine ulimit -n gives 1024. This code: from tempfile import mkstemp for n in xrange(1024 + 1): f, path = mkstemp() fails at the last line loop with: Traceback (most recent call last): File "utest.py", line 4, in…
Hooked
  • 84,485
  • 43
  • 192
  • 261
29
votes
5 answers

How to change the stack size using ulimit or per process on Mac OS X for a C or Ruby program?

It seems that the recommended way to set stack size for a C program or Ruby program (which uses the C stack), is by using ulimit in the Bash shell. But $ ulimit -s 8192 $ ulimit -s 16384 -bash: ulimit: stack size: cannot modify limit: Operation…
nonopolarity
  • 146,324
  • 131
  • 460
  • 740
27
votes
5 answers

react-native start EACCESS error for setup_env.sh

So, I got my first project in ReactNative to run from Windows for Android OS. Took a checkout on a Mac, configured it in an identical manner and as I try to start the react package manager using react-native start and get the following…
Sushant Sardeshpande
  • 1,261
  • 1
  • 10
  • 13
24
votes
1 answer

How to limit memory usage within a python process

I run Python 2.7 on a Linux machine with 16GB Ram and 64 bit OS. A python script I wrote can load too much data into memory, which slows the machine down to the point where I cannot even kill the process any more. While I can limit memory by…
Arne
  • 17,706
  • 5
  • 83
  • 99
20
votes
4 answers

Resident Set Size (RSS) limit has no effect

The following problem occurs on a machine running Ubuntu 10.04 with the 2.6.32-22-generic kernel: Setting a limit for the Resident Set Size (RSS) of a process does not seem to have any effect. I currently set the limit in Python with the following…
BrainCore
  • 5,214
  • 4
  • 33
  • 38
20
votes
4 answers

Is there a limit of stack size of a process in linux

Is there a limit on the stack size of a process in Linux? Is it simply dependent on the RAM of the machine? I want to know this in order to limit the depth of recursive calls to a function.
michael
  • 106,540
  • 116
  • 246
  • 346
20
votes
2 answers

Docker Ignores limits.conf (trying to solve "too many open files" error)

I'm running a web server that is handling many thousands of concurrent web socket connections. For this to be possible, on Debian linux (my base image is google/debian:wheezy, running on GCE), where the default number of open files is set to 1000, I…
orcaman
  • 6,263
  • 8
  • 54
  • 69
1
2 3
23 24