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
0 votes
0 answers
42 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 ...
Ilia's user avatar
  • 101
0 votes
1 answer
607 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-...
Julien's user avatar
  • 111
2 votes
0 answers
179 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 ...
Antoine Olivier's user avatar
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 ...
Qiao's user avatar
  • 111
0 votes
0 answers
77 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 ...
Eng7's user avatar
  • 115
2 votes
1 answer
4k 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 ...
Hulatime's user avatar
7 votes
4 answers
27k 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 ...
HappyFace's user avatar
  • 1,201
0 votes
0 answers
37 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?
Ali's user avatar
  • 15
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. ...
François Raoult's user avatar
0 votes
1 answer
271 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 ...
robert smith's user avatar
2 votes
1 answer
364 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). ...
Jason Gross's user avatar
0 votes
1 answer
776 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 ...
Matthew's user avatar
  • 286
0 votes
1 answer
156 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 ...
user3808748's user avatar
1 vote
0 answers
364 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 ...
Ben Ross's user avatar
0 votes
1 answer
284 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" ...
WestCoastProjects's user avatar
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 ...
Davis.S's user avatar
  • 11
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 ...
Bick's user avatar
  • 519
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 ...
Remi.b's user avatar
  • 2,641
6 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) ...
John Miller's user avatar
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 ...
Rossko_DCA's user avatar
0 votes
0 answers
518 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 ...
mursalin's user avatar
  • 101
1 vote
0 answers
459 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: ...
Program-Me-Rev's user avatar
69 votes
5 answers
77k 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 ...
mkasberg's user avatar
  • 2,603
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 ...
robster's user avatar
  • 111
1 vote
1 answer
776 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 ...
mshildt's user avatar
  • 113
1 vote
0 answers
510 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")
nihan's user avatar
  • 11
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 ...
heailraiser's user avatar
1 vote
0 answers
229 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 ...
Fernando César's user avatar
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, -...
Arapajoe's user avatar
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 ...
Sara.0's user avatar
  • 3
2 votes
1 answer
3k views

How to log out and back in using a bash script [closed]

I am trying to set ulimit when starting an EC2 instance on Amazon Web Services. Is there any way to write a script that will: sudo root to set ulimit, then: Log out and back in as my original user ...
Jiang Xiang's user avatar
1 vote
1 answer
855 views

how does GDM set ulimits (Fedora)?

On Fedora FC20. /etc/security/limits.conf has: * soft nofile 60000 * hard nofile 60000 * soft nproc 30000 * hard nproc 30000 After logging in through GDM, and opening a shell, the limits are 60000 ...
Pawel Veselov's user avatar
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 ...
toadstool333's user avatar
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# ...
AngocA's user avatar
  • 334
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-...
Tony's user avatar
  • 301
3 votes
1 answer
948 views

Why isn't "(ulimit -d 1000; firefox) &" working?

I'm trying to limit the memory usage of firefox to prevent it from stalling the whole system with problematic web sites. I tried, in bash: (ulimit -d 1000; firefox) & This should limit the ...
MWB's user avatar
  • 524
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/...
nuoritoveri's user avatar
4 votes
1 answer
4k views

Other ways to increase max open files?

I have an application which keeps giving me the following error. tail: inotify cannot be used, reverting to polling: Too many open files I have already followed all the advice I've been able to find ...
sffc's user avatar
  • 417
0 votes
1 answer
2k views

How to check core dump enabledness status in bash?

$ ulimit unlimited $ sleep 2 && killall -SEGV cat & [1] 11358 $ cat Segmentation fault $ ulimit -c unlimited $ ulimit unlimited $ sleep 2 && killall -SEGV cat & [1] 11462 $ cat ...
Vi.'s user avatar
  • 17.1k
30 votes
2 answers
114k 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 ...
mahmood's user avatar
  • 1,265
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 -...
roymustang86's user avatar
0 votes
0 answers
6k views

How to increase 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. ...
theharshest's user avatar
5 votes
1 answer
3k views

Does "ulimit -Su" limit the number of user processes created in interactive login subshells and tmux sessions created therein?

A few months ago, I wrote a set of bash scripts utilizing tmux to create a simple IDE on an AIX 7.1 server. There is a bug in one of my scripts that will sometimes generate user processes very rapidly ...
eeowaa's user avatar
  • 155
2 votes
1 answer
5k views

values set in limits.conf are not working

I set some values in /etc/security/limits.conf as below: * hard stack 204800 * hard nofile 8192 Then rebooted the server. Now the ulimit command still lists some old/default values: # ...
slayedbylucifer's user avatar
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 ...
AMIT 's user avatar
  • 557
0 votes
2 answers
2k views

Does ulimit change resource limits at runtime?

Does ulimit change the limits of running programs? Are their specific resources which can not be changed at run time? If ulimit doesn't change limits at run time, does this mean that you have to ...
AlexLordThorsen's user avatar
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 ...
Gabriel Petrovay's user avatar
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 ...
Cheetah's user avatar
  • 1,253
0 votes
0 answers
620 views

what are sane open file descriptor limits on linux?

Where can I get good guidance on sane values for open file descriptor limits on linux. We have users asking for massive numbers as their limits and I am unsure of the impact of this and what should ...
Andrew Gargan's user avatar
1 vote
1 answer
3k views

What's the meaning of ulimit -a output?

What each of the values listed in the output of ulimit -a represents? For example, what's the meaning of the following output (I've removed the obvious ones)? core file size (blocks, -c) 0 ...
Chico Sokol's user avatar