All about resource limits that can be set with the ulimit command

learn more… | top users | synonyms

1
vote
2answers
48 views

What do unlimit and limit do in the context of csh?

I'm running a csh script that calls unlimit and limit just before running a scientific model. The script looks something like so (truncated for brevity): #!/bin/csh -f # ... unlimit limit ...
6
votes
1answer
524 views

How to persist ulimit settings in OSX Yosemite?

Previous question about doing this on Mavericks is here and the answers there don't seem to work on Yosemite. I want to enable core dump generation by default upon reboot. Executing ulimit -c ...
2
votes
1answer
63 views

Unable to change ulimit setting

I edited /etc/security/limits.conf to have root hard nofile 20000 root soft nofile 10000 And added session required pam_limits.so to /etc/pam.d/common-session and ...
1
vote
0answers
29 views

limits.conf modification doesn't work

On a SLES 9 machine I added the line: vi /etc/security/limits.conf USERNAME hard cpu 70 but when I check it with "ulimit -a": SERVER:~ # su USERNAME USERNAME@SERVER:/root> ...
5
votes
1answer
89 views

ulimit logging?

When a user/process hits a ulimit is there a way to log this at the system level? I cannot find any logging information in /var/log/messages, or dmesg. I did some preliminary research and the answer ...
1
vote
1answer
47 views

How can I determine what individual ulimit constraint a process has?

I have a service that sets a custom limit for open files (ulimit -n 5000) as part of its init script. My understanding is that this will be effectively for the service and its child processes. Since ...
1
vote
1answer
3k views

Cant ssh, connection terminates immediately with exit status 254

The most recent thing I remember is changing the soft and hard memlock ulimit to unlimited. Now I cant ssh into the machine. This is the ssh log. Authenticated to IP ([IP]:22). debug1: channel 0: ...
3
votes
1answer
104 views

Different between `ulimit -e` and `renice`?

I would like to run a backup script in low CPU and disk I/O. Is there any different between this: #!/bin/bash ulimit -e 19 ionice -c3 -p $$ and this: #!/bin/bash ionice -c3 -p $$ renice -n 19 ...
3
votes
2answers
156 views

How do I configure logging for ulimits?

I was wondering if anything gets logged when any ulimits are hit (open files, etc). If so, where is this logged, and what should I be looking for? I'm using CentOS 6.
1
vote
1answer
426 views

Understanding the difference between pid_max, ulimit -u and thread_max

I am trying to understand the Linux processes. I have confusion on the terms pid_max, ulimit -u and thread_max. What exactly is the difference between these terms? Can someone clarify me the ...
1
vote
0answers
126 views

Process specific ulimit still low after changes to soft and hard ulimits

I'm having trouble with increasing the open-files ulimit (ulimit -n) for a particular process on a Debian 6 server. AFAIK I've done everything to change the servers hard and soft limits in this case, ...
1
vote
1answer
812 views

Ulimit unlimited stack behavior oddity

I am running an application on a Solaris 10 system. Yesterday we have set the process stack size to unlimited: ulimit -s unlimited Today during the load the process would not come up reporting ...
1
vote
1answer
586 views

What are the effects of increasing hard and soft limits for ldap user

I've been having some instability issues with my LDAP server. I have ~2000 machines connecting to it. Using netstat -pant | grep slapd, I can typically see 1500+ connections from the clients to the ...
4
votes
1answer
428 views

Does 'ulimit -m' not work on (modern) Linux?

This article claims that the -m flag to ulimit does nothing in modern Linux. I can find nothing else to corroborate this claim. Is it accurate? You may try to limit the memory usage of a process ...
2
votes
1answer
1k views

How to configure the process open file limit of a user?

The default open file limit per process is 1024 on - say - Linux. For certain daemons this is not enough. Thus, the question: How to change the open file limit for a specific user?
1
vote
0answers
270 views

ulimit vs. limit on FreeBSD 8.3

I had the same issue with the error as this and this question (both of which I read and understood), the message being: $ ulimit -n 20000 ulimit: bad limit: Operation not permitted I encountered ...
1
vote
0answers
121 views

Find and close/unlink message queues in the system

I have a SLES-11 machine on which I am not the root where I am building software code that makes extensive use of message queues. Due to some bugs, Now have an error: mq_open: Too many open files I ...
1
vote
0answers
150 views

Ulimits and pam modules

Can you explain me the relation of ulimit setting on a proccess and line session required pam_limits.so in pam module. In wich modules i really require this line? I have this line in pam.d/su ...
2
votes
2answers
825 views

Are limits in linux (like those controlled by ulimit or /etc/security/limits.conf) per user or per user per process?

I saw three copies of a process running and one of them cored in what seems like memory issue. Each individually occupies about 3-4 GB of memory..would a limit account for killing one of them? And if ...
16
votes
3answers
38k views

do changes in /etc/security/limits.conf require a reboot?

do changes in /etc/security/limits.conf require a reboot before taking effect? Like if I have a script that sets the following limits in /etc/security/limits.conf, does this require me to reboot ...
14
votes
5answers
16k views

How to persist ulimit settings in OSX Mavericks?

Before Mavericks, one could use /etc/launchd.conf to persist ulimit settings, for example: limit maxfiles 16384 unlimited limit maxproc 16384 unlimited It no longer works in Mavericks. What is the ...
0
votes
1answer
52 views

Does changing ulimit get logged Mac/FreeBSD

For some reason our open files ulimit (-n) is getting changes to 256 when it should be 1024. I tried searching for limit in /var/log/{system.log,secure.log} but didn't see anything useful. Any idea ...
5
votes
2answers
2k views

Setting ulimit correctly for PHP on Linux

I have /etc/security/limits.conf set to the following: nobody soft nofile 409600 nobody hard nofile 1024000 phpuser soft nofile 409600 phpuser hard nofile 1024000 httpd soft nofile 409600 httpd hard ...
1
vote
1answer
4k views

Modify 'Soft Limit' of 'Max processes'

I tried ulimit -u 2000 and ulimit -Su 2000 to modify the 'Max processes', and started up my program, but failed. I found file '/proc/pid/limit' is still: Max processes 1024 ...
0
votes
1answer
127 views

Running git with higher memory allocation

I am facing memory/data segment issues while running git. However, if I set my ulimits to a bit higher like below. ulimit -m 262144 ulimit -d 262144 It runs fine. Don't we have anyway to allocate ...
0
votes
1answer
520 views

Set ulimit to defaults

I set ulimits to fullfill memory demands of Git. Do we have anyway to reset ulimits to defaults, I mean what they were before I set them. Please keep in mind I am doing it from Python script
0
votes
1answer
240 views

No virtual memory (-v) item in output of ulimit -a

When I run command ulimit -a, I see no virtual memory item in the list of output of the command. It is unlimited for some user IDs though. Does that mean I am assigned no virtual memory?
5
votes
1answer
1k views

limits that are set in an unmodified environment

If /etc/security/limits.conf has not been edited or changed, there are nothing but comments. However 'cat /proc/self/limits' shows there are some limits in effect. Are these compiled into the kernel? ...
6
votes
1answer
4k views

How to circumvent “Too many open files” in debian

If I want to see all relevant log files of my apache2 server at once, I use tail -f /var/kunden/logs/*log /var/kunden/logs/*log /var/log/apache2/*log |grep -v robots|grep -v favicon But since those ...
9
votes
2answers
2k views

How to prevent fork bomb?

To prevent fork bomb I followed this http://www.linuxhowtos.org/Tips%20and%20Tricks/ulimit.htm ulimit -a reflects the new settings but when I run (as root in bash) :(){ :|:&};: the VM still goes ...
5
votes
1answer
6k views

Limits on the number of file descriptors

I'm trying to install 389-ds, And it gives me this warning : WARNING: There are only 1024 file descriptors (hard limit) available, which limit the number of simultaneous connections. I understand ...
3
votes
1answer
3k views

ulimit & rlimit in Linux, are they the same thing?

I see people use the terms ulimit & rlimit interchangeably, can I say they are referring to the same thing?
3
votes
1answer
74 views

Can you think of a way to stop the generation of a core file WHILE it is happening?

I was just wondering if you can think of a clever way to stop the creation of a core file while it is being produced. I understand that there are several way to disable the creation like setting ...
4
votes
2answers
11k views

Modify ulimit (open files) of a specific process

Is it possible to change the soft - and hard limit of a specific process? In my case, my process is mongod and a lot of web resources tell me to simply execute: ulimit -n <my new value> My ...
9
votes
2answers
730 views

How to solve this memory issue gracefully?

I have a standard Linux (Debian testing) laptop, with a swap partition. I do a lot of experiments with it. Some of them are really memory hungry and the way Linux behaves by default is an issue for ...
3
votes
1answer
865 views

Setting ulimits without PAM

How to do that? Without PAM on my GNU/Linux OS the number of open files is 1024 by default and cannot be raised above 4096 (via ulimit -n NNNN command) despiting what is written in ...
2
votes
1answer
13k views

How to modify ulimit for open files on SUSE Linux Enterprise Server 10.4 permanently?

SERVER:/etc # ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited pending signals (-i) 96069 ...
2
votes
1answer
172 views

Max Open Files, clarification needed

On my machine, ulimit -n returns 2560 Given that -n returns The maximum number of open file descriptors. Does it mean that system won't allow more then 2560 open files to be out there at any ...
1
vote
0answers
840 views

Permanently change per-process stack size

When I use ulimit -s to change the per-process stack size, it only lasts for that login; if I restart the setting is lost. How can I permanently change the maximum stack size on my system?
12
votes
2answers
8k views

How to Throttle per process I/O to a max limit?

I'm looking for a way to limit a processes disk io to a set speed limit. Ideally the program would work similar to this: $ limitio --pid 32423 --write-limit 1M Limiting process 32423 to 1 megabyte ...
3
votes
2answers
4k views

What are the dangers of setting a high limit to max File Descriptors per process?

I'm working on an old legacy application, and I commonly come across certain settings that no one around cam explain. Apparently at some point, some processes in the application were hitting the max ...
3
votes
1answer
464 views

Is there any use for RLIMIT_NICE?

I am using prlimit in Ubuntu to do some resource restrictions in my sandbox which has been very helpful. However, I am not quite sure what to do with RLIMIT_NICE. The docs say: RLIMIT_NICE (since ...
30
votes
1answer
25k views

ulimit: difference between hard and soft limits

What is the difference between hard and soft limits in ulimit? For number of open files, I have a soft limit of 1024 and a hard limit of 10240. It is possible to run programs opening more than 1024 ...
48
votes
4answers
49k views

Limit memory usage for a single Linux process

I'm running pdftoppm to convert a user-provided PDF into a 300DPI image. This works great, except if the user provides an PDF with a very large page size. pdftoppm will allocate enough memory to ...