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
27 views

What else can impose limits on number of files open?

I'm working on a Ubuntu 21.10 system. I am developing an application that uses raw sockets PACKET_MMAP style to get performance gains over an epoll based version. My application bombs out when it ...
user avatar
1 vote
0 answers
26 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 ...
user avatar
  • 111
0 votes
0 answers
60 views

Error trying to deploy a Java application on a poor resource server: java.lang.OutOfMemoryError: unable to create native thread

I am not a system engineer (I am a software developer) and I am finding the following problem trying to deploy a Java application on a CentOS 7 production server. Basically running my java application ...
user avatar
  • 6,539
0 votes
0 answers
24 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 ...
user avatar
  • 115
1 vote
0 answers
290 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 ...
user avatar
3 votes
4 answers
7k 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 ...
user avatar
  • 751
0 votes
0 answers
25 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?
user avatar
  • 15
0 votes
1 answer
986 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. ...
user avatar
0 votes
1 answer
148 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 ...
user avatar
2 votes
0 answers
202 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). ...
user avatar
0 votes
1 answer
200 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 ...
user avatar
  • 238
0 votes
1 answer
50 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 ...
user avatar
1 vote
0 answers
66 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 ...
user avatar
0 votes
1 answer
133 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" ...
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 ...
user avatar
  • 11
4 votes
0 answers
4k 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 ...
user avatar
  • 491
3 votes
1 answer
1k 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 ...
user avatar
  • 2,571
5 votes
1 answer
5k 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) ...
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 ...
user avatar
0 votes
0 answers
453 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 ...
user avatar
  • 101
1 vote
0 answers
435 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: ...
user avatar
61 votes
5 answers
64k 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 ...
user avatar
  • 2,313
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 ...
user avatar
  • 111
1 vote
1 answer
715 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 ...
user avatar
  • 113
1 vote
0 answers
378 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")
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 ...
user avatar
1 vote
0 answers
188 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 ...
user avatar
4 votes
1 answer
4k 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, -...
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 ...
user avatar
1 vote
1 answer
2k 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 ...
user avatar
1 vote
1 answer
741 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 ...
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 ...
user avatar
23 votes
3 answers
50k 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# ...
user avatar
  • 334
19 votes
3 answers
99k 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-...
user avatar
  • 291
3 votes
1 answer
851 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 ...
user avatar
  • 310
1 vote
0 answers
340 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/...
user avatar
3 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 ...
user avatar
  • 397
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 ...
user avatar
  • 15.9k
24 votes
2 answers
91k 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 ...
user avatar
  • 1,005
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 -...
user avatar
0 votes
0 answers
5k 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. ...
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 ...
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: # ...
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 ...
user avatar
  • 557
0 votes
2 answers
1k 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 ...
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 ...
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 ...
user avatar
  • 1,133
0 votes
0 answers
578 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 ...
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 ...
user avatar
0 votes
1 answer
843 views

Why do we need hard and soft limit in open file count?

I was reading a separate SU question on setting ulimit value and the answer from Gordon mentioned something about hard and soft limit on open file descriptor count. Just curious, why do we need a hard ...
user avatar
  • 391