Questions tagged [ulimit]

ulimit provides control over the resources available to the shell and to processes started by it, on systems that allow such control

Filter by
Sorted by
Tagged with
2 votes
1 answer
5k views

Where can I find the default docker ulimit settings?

I have been trying to understand an issue I've had when running roribio16/alpine-sqs docker image on one of my machines. Whenever I try to run the image without specifying any other settings, docker ...
1 vote
2 answers
4k views

Why changes to /etc/limits don't work on an embedded system

I am trying to provide support for core dump on my ARM based target. I have read about both /etc/limits and /etc/security/limits.conf. My target file system doesn't have the latter one on to it. So I ...
0 votes
0 answers
45 views

sudo su and sudo -i-u dont work as expected [duplicate]

I am migrating one of our servers from centos 7 to ubutnu 22.4 lts Found an interesting issue: set /etc/security/limits.conf is set set with: * soft core unlimited * hard core unlimited created new ...
1 vote
3 answers
8k views

XAMPP won't start Apache on Mac OS X 10.6.8 Snow Leopard

When I try starting Apache from the XAMPP control panel (Mac OS X 10.6.8 Snow Leopard), I get the following error popup and Apache won’t start: /Applications/XAMPP/xamppfiles/bin/apachectl: line 70: ...
4 votes
1 answer
3k views

Why is `ulimit` not limiting the memory usage as I expect?

I am trying to limit the memory usage of a process $ulimit -m 2 $/usr/bin/time -l ./myProcess arg1 arg2 The process run without being killed until time outputs 7.00 real 4.83 user ...
0 votes
1 answer
634 views

building with docker compose v2 fails but legacy docker-compose v1.29.2 and docker build succeed

I have this Dockerfile FROM alpine/git as clone WORKDIR /keycloak RUN git clone https://github.com/maturbet-volta/nexus3-keycloak-plugin.git WORKDIR /cargo RUN git clone https://github.com/sonatype-...
2 votes
1 answer
377 views

What is the history behind `ulimit -m` / RLIMIT_RSS not working?

According to man setrlimit (which is what man ulimit directs me to), RLIMIT_RSS Specifies the limit (in bytes) of the process's resident set (the number of virtual pages resident in RAM). ...
2 votes
0 answers
195 views

Ulimit no file just won't change (Ubuntu)

I followed everything I could find on how to change the maximum value of ulimit nofile but it's still stuck at 4096. Both my /etc/systemd/system.conf and /etc/systemd/user.conf have the line ...
0 votes
1 answer
273 views

ulimit -f control file size for docker container's external host volume?

I am running a database (CouchDB) from a Docker container on Unix (AWS EC2). For the database files, I have created an 'external' (ie. external to the container, but on the same host) volume which is ...
31 votes
2 answers
115k views

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 ...
1 vote
0 answers
1k views

How to limit sshd/sftp connections or memory use in Linux?

I'm working on an embedded Linux system, and I found it will report 'page allocation stall' while I'm downloading file via sftp. Please refer to this video for detail. I've tried the following ways to ...
7 votes
4 answers
28k views

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 ...
5 votes
4 answers
34k views

How to increase stack limit permanently without restarting

I need to increase the default stack size on Linux. As I know there are usually two ways: ulimit -s size /etc/security/limits.conf The ulimit method only works as long as I am logged in. limits....
0 votes
0 answers
79 views

Eliminate limits for port connection for Redis on CentOS

I am using Redis caching server on CentOS, where Redis accepts clients connections on the configured listening TCP port. I am trying to figure out the limits applied by the operating system to the ...
69 votes
5 answers
78k views

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 ...
0 votes
0 answers
39 views

How to open 100 file with one proccess?

I know the output of ulimit -S -n is the number of fd that a process can handle or create. How can I open files more than that number to reach the limit of my system with one process ID?
47 votes
4 answers
62k views

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 ...
0 votes
1 answer
2k views

Too many open file with high limits

With Ubuntu 18.04.4 LTS (Linux 5.3.0-62-generic), I have very often "Too many open files" error. For example, I have to close web browser to use / build / compile with Android Studio. ...
0 votes
1 answer
825 views

How can I increase the process limit (ulimit -u) for X users on Fedora?

Between having, ahem, "a few" tabs open in Firefox and occasionally having to use Chromium, which is a crazy process hog (something like 12 processes per tab), I often find myself hitting the process ...
8 votes
3 answers
21k views

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 ...
2 votes
3 answers
15k views

pipe: too many files open renders entire OS completely useless

I'm running Ubuntu 12.04, and I am having a major problem. Two separate times today, one of my open gnome-terminal sessions locked up and printed the error pipe: too many open files I realize that ...
0 votes
1 answer
158 views

inconsistency while using ulimit

I am running into an inconsistency while using ulimit. I make changes directly to the conf file "/etc/security/limits.conf". Whenever I use just user names, I have zero problems. For example: root ...
1 vote
0 answers
380 views

Need a solution to handle 100 parallel requests in nginx

I have Nginx (in a 16 core, 64GB RAM, centos 7 box) that has to handle more than 100 parallel requests. I tried the following: set the ulimit using /etc/systemd/system/nginx.service.d/override.conf ...
0 votes
1 answer
297 views

Relationship of "ulimit -a" to fs.file-max

I am on an amazon linux ec2 instance and need to increase the files limit (to run spark). It had been my recollection there were a way to do something like ulimit -n 8192 But that is not "taking" ...
109 votes
7 answers
146k views

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: ...
4 votes
0 answers
5k views

Increase number of open files in mac high sierra

On a mac high sierra 10.13.3 I have 256 open files. I want to raise it and I open a terminal and enter sudo launchctl limit maxfiles 1000000 1000000 This doesnt change anything when I enter ulimit ...
23 votes
3 answers
51k views

Open files limit does not work as before in OSX Yosemite [duplicate]

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# ...
28 votes
2 answers
32k views

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 ...
1 vote
0 answers
2k views

Increasing ulimit open files and max procedures

I'm working on a test machine and I want to increase ulimit's max open files and max procedures in macOS Sierra. I run sudo ulimit -n 100000 120000 and sudo ulimit -u 10000 12000. no error shows. But ...
20 votes
3 answers
105k views

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-...
7 votes
1 answer
7k views

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) ...
1 vote
0 answers
498 views

Adobe flash on Linux 64bit: "Movie not loaded" and maximum stack-size

I was experiencing problems with all flash content (tried Firefox/Chromium/Opera, Ubuntu/Fedora and several Flash releases to no avail). While trying to playback any flash-movie, no video/sound ...
9 votes
2 answers
5k views

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?
0 votes
1 answer
6k views

Consequences of setting max open file descriptors to “unlimited” and how?

Is it possible to permanently set max open file descriptors to unlimited (or something like 1 000 000 000 /or even higher)? If yes, please tell me how. I tried ulimit -n 1048576 and it's working, but ...
0 votes
0 answers
519 views

ulimit not working properly

i am trying to limit the memory usage of a process using ulimit ulimit -Sv 100000 ulimit -St 10 fakechroot ./compiledfile i am running the command in the same terminal (i am using ubuntu 16.04) and ...
1 vote
0 answers
461 views

How to Increase Number of Open Files Limit in Linux

I'm trying to increase the number of files that can be opened by a user, but I keep getting the error: bash: ulimit: open files: cannot modify limit: Operation not permitted Currently it's at: ...
7 votes
1 answer
14k views

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 ...
1 vote
1 answer
1k views

I can't seem to resolve java.io.FileNotFoundException (Too many open files in system)

Disclaimer. First I am NOT a SU. I'm a mid level computer user with a bit of experience. I can write some basic code, have used computers for 20+ years. MSDOS, to Windows through the years now I'm ...
0 votes
1 answer
1k views

Do I have to restart my machine for ulimit - u to take affect?

So I have an external 3rd party application which runs on Java. The JVM is getting a load of OutOfMemeory errors and their support team suggested I raise the ulimit - u from he default 1024 to 4096 ...
1 vote
1 answer
778 views

Unable to enable core dumps (ubuntu/ARM)

I'm struggling to enable core dumps in Ubuntu 14.04 LTS (ARM) running on an nVidia Jetson TX1 SBC. I've done all of the usual stuff, including suggestions from here and here. There is plenty of space ...
1 vote
0 answers
514 views

What is the difference between ulimit -r and -e?

What is the real-time scheduling priority mean (ulimit -e) ,and how to use it ? -r The maximum real-time scheduling priority -e The maximum scheduling priority ("nice")
1 vote
0 answers
427 views

Ulimit is set on second login, not first

I'm using Debian Jessie and I have a strange error connected with setting the limit of open files per process. I want to increase the default limit for certain user (me), so I added to /etc/security/...
0 votes
1 answer
1k views

Limit CPU/RAM in all process for debian

Whenever i run CPU/RAM intensive tasks, i cant use my computer it freezes until the task is complete. I was looking for a way to limit resources per process for all processes. i.e so none of the ...
13 votes
2 answers
17k views

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 ...
1 vote
2 answers
3k views

Core dump generation on Linux

Something very perplexing is going on, with respect to my box. Below are my settings in /etc/sysctl.conf: kernel.core_pattern = core kernel.core_uses_pid = 1 In /etc/profile, I have this: ulimit -...
1 vote
0 answers
236 views

ulimit seems to freeze bash script

I'm running a bash script that runs multiple small apps with different inputs. Some of these apps have bugs (e.g., never finish) and so I use ulimit to get the output or an error from all of them. In ...
3 votes
1 answer
2k views

Cannot increase maxfiles limits on Mac 10.7

I an only set lower values for the launchctl limit maxfiles. I try launchctl limit maxfiles 2048 2048 and nothing changes: $ launchctl limit maxfiles maxfiles 500 500 $ launchctl limit ...
5 votes
1 answer
5k views

Real-time option in ulimit

Calling ulimit -a returns the following: core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -...
5 votes
1 answer
6k views

Increasing Yosemite maxfile limit for Application

I've been trying to up the maxfile limit and maxfileperproc limit on Yosemite, with no luck. I have created a sysctl.conf file in the etc folder, which has successfully increased the values when ...
0 votes
1 answer
2k views

xterm: Can't execvp ulimit

I setup my suse to work with xterm so it could pop up gdb when my tests crash. The test launching .exe file runs the specified test and opens up gdb when crash occurs. This works just fine. There is a ...