ulimit gets or sets the upper limit for resources available to the current shell.
Questions tagged [ulimit]
356 questions
9
votes
2 answers
Processes resources not limited by setrlimit
I wrote a simple program to restrict it's data size to 65Kb and to verify the same i am allocating a dummy memory of more than 65Kb and logically if i am doing all correct (as below) malloc call should fail, isn't it?
#include…

pa1
- 778
- 3
- 11
- 26
9
votes
4 answers
How do I set a ulimit from inside a Perl script that applies to its children?
I have a Perl script that does various installation steps to set up a development box for our company. It runs various shell scripts, some of which crash due to lower than required ulimits (specifically, stack size -s in my case).
Therefore, I'd…

Artem Russakovskii
- 21,516
- 18
- 92
- 115
9
votes
1 answer
Is there any downside to setting ulimit really high?
I was running into problem with too many open files with Tomcat7 on Ubuntu 12, so I increased the hard and soft limit on the number of open files from 4096 and 1024, respectively, to 16384. Now I'm not getting any more errors about open files, but…

Jesse Barnum
- 6,507
- 6
- 40
- 69
9
votes
3 answers
close on socket not releasing file descriptor
When conducting a stress test on some server code I wrote, I noticed that even though I am calling close() on the descriptor handle (and verifying the result for errors) that the descriptor is not released which eventually causes accept() to return…

user1735067
- 141
- 1
- 5
8
votes
1 answer
Meaning of ulimit Hard (-H) and Soft (-S)
What does Hard / Soft limits mean?
Difference on core file size for example:
ulimit -Sc 1024 versus ulimit -Hc 1024
I usually put in my script ulimit -c unlimited before running a binary.
However, I want to limit the file size to avoid disk…

oHo
- 51,447
- 27
- 165
- 200
8
votes
2 answers
Windows equivalent of ulimit -n
What is the windows equivalent of the unix command " ulimit -n" ?
Basically, i want to set the maximum fd limit via command prompt.

maximus1986
- 179
- 3
- 3
- 7
8
votes
1 answer
Kafka broker node goes down with "Too many open files" error
We have a 3 node Kafka cluster deployment, with a total of 35 topics with 50 partitions each. In total, we have configured the replication factor=2.
We are seeing a very strange problem that intermittently Kafka node stops responding with…

Ankit Singhal
- 81
- 1
- 1
- 3
8
votes
2 answers
Limit python script RAM usage in Windows
My program can allocate suddenly a lot of RAM based on usage.
I want to limit the RAM it can take from the system.
I saw here:
Limit RAM usage to python program
But it works only for Unix.
Any solution for Windows?

BestR
- 669
- 2
- 6
- 17
8
votes
3 answers
set `ulimit -c` from outside shell
I have a program that's running automatically on boot, and sporadically causing a coredump.
I'd like to record the output, but I can't seem to set ulimit -c programmatically (It's defaulted to 0, and resets every time).
I've tried using a bash…

Jono
- 707
- 2
- 8
- 17
7
votes
2 answers
docker-compose yaml - option to pass the 'ulimit' parameters 'rtprio' and 'memlock'
I can't find the option in the docker-compose.yaml to pass the parameters the following 'docker' parameters:
--ulimit rtprio=95 --ulimit memlock=-1
In other words, I wish to wrap the following command with docker-compose:
docker run --rm -it…

Hanoch Giner
- 359
- 1
- 4
- 12
7
votes
2 answers
Docker error while creating couchbase - ulimit: open files: cannot modify limit: Operation not permitted
I am trying to create a docker image for Couchbase and i get the following error with the dockerfile on CentOS image.
# expose default port
EXPOSE 8091
ENV PATH $PATH:/opt/couchbase/bin
RUN cd /var/tmp &&\
wget…

cucucool
- 3,777
- 8
- 48
- 63
7
votes
2 answers
Duplicity doesn't like max open files setting on Mavericks
I use duplicity to backup some files. I'm now trying to restore to my Mac to test the backup, but get the following error:
> duplicity me@backupserver.io/backup_dr ~/restored_files
Max open files of 256 is too low, should be >= 1024.
Use 'ulimit -n…

Gazza
- 3,051
- 1
- 20
- 22
7
votes
4 answers
ssh remote command execution and ulimit
I have the following script:
cat > /tmp/script.sh <

Long Cheng
- 253
- 1
- 3
- 8
7
votes
4 answers
Problems opening more than 10,000 files in Perl
I need to open more than 10,000 files in a Perl script, so I asked the system administrator to change the limit on my account to 14,000. ulimit -a now shows these settings:
core file size (blocks, -c) unlimited
data seg size (kbytes,…

Arav
- 4,957
- 23
- 77
- 123
6
votes
1 answer
How to configure ulimit with supervisord (to start varnish)
I am migrating a server configuration to supervisord (from init.d files).
There are a few instances of varish running. I remember when I started using varnish I had ulimit problems so there is the following lines in the init.d/varnish scripts
ulimit…

Kevin Gill
- 61
- 1
- 3