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

learn more… | top users | synonyms

63
votes
4answers
64k 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: ...
37
votes
3answers
44k 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 ...
18
votes
1answer
15k 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 ...
17
votes
2answers
8k views

Make ulimits work with start-stop-daemon

I have an init.d script that starts an app using start-stop-daemon --chuid SOME_SYSTEM_USER. That is, the app runs under a different user, not root. Problem is, the app needs special limit settings (...
13
votes
2answers
21k views

Open files limit does not work as before in OSX Yosemite

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

ulimit does not obey me

Well.. $ ulimit -s 8192 $ sudo ulimit -s 16384 $ ulimit -s 8192 Why does ulimit disrespect me in such a barbaric way? Lion, by the way.
8
votes
2answers
8k 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 ...
7
votes
1answer
4k views

strange behaviour with ulimit on Mac OS X 10.6

I get some very strange behaviour when working with ulimit. I just open up a new shell Hector:~ robertj$ ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) ...
5
votes
2answers
5k 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 ...
5
votes
2answers
4k views

ulimit nofiles and lsof

If I do an lsof | grep user | wc -l I get a number returned in the 25,000 range. If I check ulimit -a user nofiles is set at 1024. Can someone help me to understand the number of open ...
5
votes
1answer
720 views

Locked out of host after reaching some ulimit

So, I have a sudoer account in a remote host, in which I create a process with thousands of threads and sockets. The thing is, if I create too many threads/sockets (not sure which one, it might even ...
4
votes
2answers
21k 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-...
4
votes
1answer
8k views

Why does limiting my virtual memory to 512MB with ulimit -v crash the JVM?

I am trying to enforce maximum memory a program can consume on a Unix system. I thought ulimit -v should do the trick. Here is a sample Java program I have written for testing : import java.util.*; ...
4
votes
2answers
4k 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 ...
4
votes
1answer
6k 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 ...
3
votes
1answer
3k 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 ...
3
votes
2answers
1k views

daemontools and ulimit

I have a daemontools service whose /service/myservice/run contains: #!/bin/sh exec setuidgid someuser somecommand Now, if I run this as a script directly from a root shell, somecommand will get a ...
3
votes
1answer
1k 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 ...
3
votes
1answer
983 views

How can I increase the number of open filehandles in Linux?

I'm trying to increase the number open file handles on a server of mine and the usual places don't seem to be taking effect: root@dev:~# sysctl -p |grep file fs.file-max = 200000 root@dev:~# grep ...
3
votes
1answer
1k 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 ...
3
votes
1answer
817 views

limits.conf ulimits not being applied to chrooted processes

We allow users to execute scripts on our servers. Our security model involves chrooting them. We want to be able to apply ulimit restrictions to them, and the best way to do it would seem to be in /...
2
votes
1answer
466 views

Remaining number of open files in Linux

ulimit -a tells me I have a limit of 1024 open files, which is the default on my distro. Is there a way to show how many of these are currently used, or how many are remaining?
2
votes
2answers
796 views

Linux: Make “ulimit” limits be cumulative across spawned “subprocesses”

Let's say I have program #1 launching program #2 which is launching program #3. If I call ulimit -t 10 before calling program #1, then EACH program will be alloted 10 seconds of CPU time. Could I ...
2
votes
2answers
874 views

ulimit broke my server

I ran "ulimit -v 75" to get SBCL working, and now nothing will run on my server. $ sbcl Killed $ vi Killed $ man ulimit Killed $ ulimit -v 256 -bash: ulimit: virtual memory: cannot modify limit: ...
2
votes
1answer
3k 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: # ...
2
votes
1answer
327 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, -...
1
vote
1answer
244 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 ...
1
vote
2answers
12k 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....
1
vote
1answer
2k 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 ...
1
vote
1answer
262 views

Why does “ulimit -t 5” have no effect on “less” or “man”, but work on “yes”?

If I run $ ulimit -t 5 $ yes then yes gets killed after 5 seconds, but man and less/more don't. Why are those two immune to ulimit?
1
vote
1answer
189 views

Best folder configuration for application that opens around 1 million files and ulimit problems

I have an application that creates 16^5 files (1048576). I can configure it to create all them in the same folder or separate them in whatever way I want (having 1, 2, 3 or 4 subfolders on each folder)...
1
vote
0answers
23 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
0answers
32 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 ...
1
vote
1answer
228 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 ...
1
vote
0answers
124 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/...
1
vote
2answers
2k 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
0answers
373 views

How to find out the available (and used) user resources?

With ulimit, we can find out how many open files, running processes etc. at most the user can have at the same time. My question is: how can we find out how much of these limits are being used and how ...
1
vote
0answers
415 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 ...
1
vote
3answers
6k 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: ...
1
vote
0answers
2k views

Update ulimit parameters on ubuntu with out restarting

I am trying to update ulimit open files limit from 1024 to 30000. but i need this change with out restarting the server? Even on restarting the server this changes are not reflected followed this ...
1
vote
1answer
1k views

ulimit soft limit for file descriptors - for a non-root user on CentOS 5.6

I am needing to increase the soft limit for "file descriptors", and make it effective for a non-root user (lets say user1). Ran these commands, while logged in as user1: >ulimit -a core ...
1
vote
2answers
1k views

how to limit resource in Linux

I've posted a question about this few hours ago on Stack Overflow: Linux bash inline command to execute a program and limit the resource As I know, to limit the resource I can use ulimit command....
0
votes
2answers
5k 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 ...
0
votes
1answer
1k 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 ...
0
votes
1answer
68 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 ...
0
votes
1answer
271 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 ...
0
votes
1answer
160 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 ...
0
votes
2answers
770 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 ...
0
votes
1answer
379 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 ...
0
votes
0answers
25 views

RabbitMQ/Elasticsearch too few/many files (ulimit, limit maxfiles)

This is for my local dev setup: Problem #1: RabbitMQ was running out of socket descriptors for which the recommended solution was to set ulimit -n 65536 65536 in ~/.zshrc Problem #2: ...