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

learn more… | top users | synonyms

1
vote
2answers
49 views

Changes to /etc/security/limits.conf and /etc/security/limits.d/20-nproc.conf have no effect

On a CentOS Linux release 7.1.1503 (Linux kernel version 3.10.x) VM, I added the following lines to both /etc/security/limits.conf and /etc/security/limits.d/20-nproc.conf: someuser soft ...
36
votes
4answers
49k 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 ...
5
votes
4answers
13k 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: ...
1
vote
2answers
48 views

ulimit command not found (without sudo) and error - coredumpsize: Can't set limit (Operation not permitted)

When i initially login to a server, I see the following error message. ullimit: coredumpsize: Can't set limit (Operation not permitted) Further, when I try to copy files into this machine, I see ...
79
votes
6answers
101k 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 ...
1
vote
1answer
2k views

Increasing `ulimit -u` settings temporarily in OSX Yosemite

I'm trying to temporarily (without restarting the machine, just for test that starts a JVM) increase the number of processes to 2048 in OSX Yosemite but I'm unable to do so. First, I tried calling ...
67
votes
5answers
121k 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 ...
8
votes
2answers
4k 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 ...
0
votes
2answers
41 views

Why is ulimit -u higher than /proc/sys/kernel/pid_max?

On my system ulimit -u reports 63172 and /proc/sys/kernel/pid_max reports 32768. Why is it that the value for ulimit -u is higher than the kernel's value? From my understanding, ulimit -u shows the ...
3
votes
1answer
5k 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 ...
5
votes
2answers
872 views

How to check ulimit usage

Is there any way to check the usage of the ulimits for a given user? I know that you can change ulimits for a single process when you start it up or for a single shell when running but I want to be ...
-1
votes
1answer
76 views

AIX: How to find sftp file limit?

Can anybody please help to find sftp file limit on following version on AIX (7.1.2.3). I have following values set I am not able sftp a 110 KB file. ulimit -a time(seconds) unlimited file(...
1
vote
1answer
104 views

Systemcrash suexec forkbomb.sh ulimits

I got this script named fork.sh: #!/bin/sh forkbomb() { forkbomb | forkbomb & } ; forkbomb If I call it through suexec my whole system will consume 99% cpu. To prevent a normal bash forkbomb I ...
3
votes
1answer
163 views

Configuring ulimit of `max open files` for daemonized nginx master process

I have an nginx-daemon running on a Debian (8.3). The nginx process occasionally runs into resource limitations when trying to write log files: too many open files. The nginx master process is ...
3
votes
2answers
238 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 /etc/pam.d/common-session-...
-1
votes
1answer
68 views

AIX : /etc/security/limits file Parameters [closed]

Can anybody please explain about following parameters found /etc/security/limits file default: fsize = 2097151 core = 2097151 cpu = -1 data = 262144 rss = 65536 stack = 65536 ...
3
votes
0answers
234 views

Unable to log into Cockpit server - could not set limit for 'nofile'

I have Cockpit installed on a Fedora 22 VPS that I use for educational purposes. I tried logging into Cockpit from my browser, but I was given a "Permission denied" message, despite using the correct ...
0
votes
1answer
100 views

How “Max open files” soft and hard limit are set for specific process?

I used the cat /proc/<pid>/limits command to check the Max open file hard and soft limit, but I want to know how this value will be set and can it be increased or decreased? Is this value is ...
1
vote
1answer
2k 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 ...
6
votes
2answers
4k views

What are pending signals?

When looking at the limits of a running process, I see Max pending signals 15725 What is this? How can I determine a sensible value for a busy service? Generally, I can't seem to find a ...
0
votes
0answers
45 views

home directory restriction

I am in serious doubt and need to implement to specific area Scenario A normal user , he can create file and folder in his home directory .he wouldn't not permitted to delete folder and file ...
0
votes
0answers
41 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: ...
3
votes
0answers
62 views

“Fork failed” while using my development environment

I'm a software developer mainly using Java on Arch Linux. I am experiencing a lot of resource failures recently, in my development environment and in the system itself. When I start all the ...
2
votes
0answers
765 views

File descriptor limits in /etc/system vs /etc/sysctl.conf vs /etc/security/limits.conf on Solaris

Let me explain first what I understood. In Solaris 10, rlim_fd_max and rlim_fd_cur in /etc/system set the hard and soft limits at the system level. And /etc/security/limits.conf sets the limits for ...
0
votes
1answer
168 views

Amazon [Ec2 Linux Instance] SSH not working after increasing Open Files / File Descriptors (FD)

I am not able to ssh my ec2 instance [linux based] after I have executed following command. [Before that I am able to ssh to server] # vim /etc/sysctl.conf I have update file-max number to 4000000 ...
0
votes
1answer
260 views

How to set the nofile limit on rsyslog with upstart?

I'm struggling to work out how to set the open file limit on rsyslog on Ubuntu 14.04. It uses Upstart, which ignores limits.conf, but I'd expect to be able to put limit nofile 16384 16384 in /etc/...
16
votes
3answers
16k 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 ...
1
vote
1answer
144 views

Missing core dump

I have a crashing application, which crashes with the output: Aborted (core dumped). Now when I look at the directory, containing the binary, there is no crashdump. There is no core directory. ...
1
vote
1answer
230 views

Why lsof reports a higher number of open files of user than what ulimit says should be allowed?

I have checked the result for user kpiserv [kpiserv@***** ~]$ lsof -u kpiserv |wc -l 5358 [kpiserv@***** ~]$ ulimit -a open files (-n) 1024 Why lsof reports a ...
7
votes
1answer
397 views

Enable Massive Concurrent SSH to a single server

My goal is to allow 10000 concurrent sshs running on a single server. For simplicity I am ssh-ing to localhost: for i in `seq 1 10000`; do ssh localhost "echo ${i}; sleep 100" >>./info 2&...
6
votes
3answers
7k 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
0answers
471 views

“Too many open files ssh” when the number of open files is far below ulimit

I was trying to set up 2000 concurrent ssh connections, but got the error message in server log (i.e. journalctl): sshd[1356]: error: reexec socketpair: Too many open files I've set both the soft ...
1
vote
0answers
59 views

How can I define time limit to a user's group per session

I have the group ABC and I need to configure a time-limit to 2min per session for its members. Like a TMOUT is only for a user, but I need for a group). How can I define time limit to a user's group ...
1
vote
0answers
21 views

Limit cpu usage to one core [duplicate]

I want to run a server with user-written scripts. But these scripts should only use one core (which should be the one with the lowest usage because there will be many concurrent scripts). Also I need ...
8
votes
2answers
10k 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 ...
0
votes
0answers
111 views

LINUX processes are forking up to thousand of processes again, even after kill command

On one of our boxes, I'm encountering strange problem from time to time.. in.tftpd processes are forking up to thousand of processes, getting server to almost unresponsive state. I've tried various ...
4
votes
1answer
227 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> ...
1
vote
2answers
495 views

how to run script with a clean login shell

I am connected to remote machine Linux RH6 directly via ssh (key imported on server), when I execute a shell script with arguments for restarting the java service, I have a strange issue with ulimit: ...
2
votes
0answers
131 views

Catch/diagnose user process being killed - Inexplicably logged out automatically

Context: I'm using bash in Mac OSX Yosemite. Problem: I'm executing a (python) script that I expect to use alot of resources and take a few hours to run, redirecting stdout and stderr to a log file. ...
3
votes
0answers
6k views

ulimit settings in /etc/security/limits.conf not in effect for users

Oracle Linux 6.6 Goal: user jboss_app should be able to run up to 16384 processes We increased max user processes because a user was running out of processes. Current contents of limits.conf: #&...
2
votes
1answer
303 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
2answers
4k 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 /usr/bin/...
6
votes
1answer
724 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
2k 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
0answers
276 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
1answer
149 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 ...
4
votes
1answer
359 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 -...
5
votes
2answers
4k 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 ...
6
votes
1answer
2k 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? ...
1
vote
1answer
19k 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 ...