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
80
questions
0
votes
1
answer
928
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 ...
6
votes
2
answers
8k
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 files ...
1
vote
1
answer
322
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
1
answer
462
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?
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 ...
5
votes
1
answer
15k
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.*;
...
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 ...
22
votes
2
answers
16k
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 (...
1
vote
0
answers
461
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 ...
5
votes
1
answer
1k
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
2
answers
2k
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 ...
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 ...
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: ...
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 ...
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?
4
votes
1
answer
2k
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 /...
4
votes
1
answer
2k
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 ...
0
votes
0
answers
3k
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 ...
0
votes
2
answers
6k
views
coredumps don't work after enabling them in /etc/security/limits.conf on Debian
I have some init scripts that launch some daemons that I wrote. I want Linux to generate a coredump anytime something crashes. I activated coredumps in /etc/security/limits.conf by adding the next ...
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....
8
votes
1
answer
8k
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) ...
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: ...
2
votes
1
answer
2k
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
2
answers
2k
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.
...
2
votes
1
answer
587
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?
3
votes
2
answers
2k
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 ...
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 ...
2
votes
2
answers
1k
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: ...
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 ...
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 ...