Questions tagged [ulimit]
181 questions
5
votes
1 answer
Practical ulimits
One of the projects I'm working on is moving certain puppet-applied ulimit settings away from "that sounds about right" to dynamically allocated based on the environment. This is for single-application environments, so I'm mostly worried about…

sysadmin1138
- 133,124
- 18
- 176
- 300
5
votes
3 answers
can't log in when nofile is set to unlimited in /etc/security/limits.conf
I set the following values (-1 will be resolved to unlimited, I suppose) in /etc/security/limits.conf (CentOS 6.2)
root nofile soft -1
root nofile hard -1
and I can't log in with root user now. Similar to the issue described here. Setting the value…

manuzhang
- 157
- 1
- 1
- 6
5
votes
4 answers
How to increase max FD limit for a daemon process running under a headless user?
To increase the FD limit for a daemon process running under a headless user on a Ubuntu Linux machine we did following changes in /etc/security/limits.conf
soft nofile 10000
hard nofile 10000
We also added session required pam_limits.so in…

Ameliorator
- 181
- 2
- 6
5
votes
2 answers
Understanding ulimit -u
I'd like to understand what's going on here.
linvx$ ( ulimit -u 123; /bin/echo nst )
nst
linvx$ ( ulimit -u 122; /bin/echo nst )
-bash: fork: Resource temporarily unavailable
Terminated
linvx$ ( ulimit -u 123; /bin/echo one; /bin/echo two;…

tripleee
- 1,416
- 3
- 15
- 24
5
votes
1 answer
Is this the correct way to permanently set the ulimit in Debian?
Manually I can set via ulimit -n 20000 the file descriptor limit and it works fine. To have this limit for every user also after a restart of the machine, can I add
* soft nofile 20000
to /etc/security/limits.conf?
I…

disco crazy
- 277
- 6
- 14
5
votes
3 answers
Squid running out of file descriptors on Ubuntu
I am running Squid 2.7 on Ubuntu 10.04 64bits.
I had the problem of Squid running out of file descriptors, with the following error showing in /var/log/squid/cache.log:
WARNING! Your cache is running out of filedescriptors
I checked…

UrkoM
- 383
- 4
- 17
5
votes
1 answer
How do I set 'max threads per process' ulimit for non-root user?
Ulimit man page suggests -r option will set this but it only appears to be valid for the root user and there is no equivalent for setting it via /etc/security/limits?
Any ideas?

Jon
- 2,121
- 2
- 13
- 13
5
votes
2 answers
Using ulimit to limit the amount of memory a script can use
I have an ubuntu system and I have a script that runs regularly. I need to limit the maximum amount of memory that this script can use. AFAIK ulimit is the command to do this, however I can't get it to work.
For example I have the following…

Amandasaurus
- 31,471
- 65
- 192
- 253
4
votes
3 answers
Can we set ulimit in /etc/sysconfig/init file to apply the value at boot time
I need to have the ulimit value set at the boot time to all my services. I have values set in /etc/sysconfig/limits.conf but these values are not applicable during the boot time and it takes 1024 as default.
I have set the values in limits.conf,…

Sandeep Sukhija
- 143
- 1
- 4
4
votes
2 answers
Linux: limits.conf values are not honored
I set some values in /etc/security/limits.conf as below:
* hard stack 204800
* hard nofile 8192
Then rebooted the server. Also I have removed the file /etc/security/limits.d/90-nproc.conf
However, the ulimit command still lists some…

slayedbylucifer
- 504
- 3
- 7
- 24
4
votes
4 answers
How does ulimit come into effect on the fly?
I have added 2 lines in
/etc/security/limits.conf
myuser soft nofile 16384
myuser hard nofile 16384
...which has no effect:
su -
sysctl -p
su myuser
ulimit -n
1024
It is important that this comes into effect without the user having to log in…

recalcitrant
- 153
- 1
- 3
4
votes
2 answers
Will open files limit in Centos affect HTTP connections? Does the limit apply to a single session or all sessions?
When I do a ulimit -n I got 256, I assume it means I can open 256 files at the sametime.
Does it means I can open 256 files with one single session? or all sessions?
For example, I logined to my server with username "abc" (via putty/ssh), and open…

forestclown
- 945
- 4
- 15
- 25
4
votes
2 answers
(node) Hit max file limit. Increase "ulimit -n"
In Ubuntu 9 I am receiving a message on my server that says:
(node) Hit max file limit. Increase "ulimit -n"
However, typing commands in the terminal reveals the following:
$ ulimit
unlimited
$ ulimit -n
65535
And a netstat reveals I…

kidcapital
- 847
- 2
- 8
- 10
3
votes
1 answer
"Too many open files" Apache error even with increased ulimit and sysctl
I'm load testing an Amazon Linux EC2 instance running Apache (event MPM) and PHP-FPM using Locust. When I run my load test with 200 users (~28 requests per second), everything is fine. When I boost the number of users to 300 (~43 requests per…

Monkey34
- 161
- 1
- 4
3
votes
1 answer
Changing ulimit on systemd
I've found this link, showing how to change the ulimits on systemd.
/etc/systemd/system/.d/override.conf
[Service]
LimitNOFILE=49152
I found a website suggesting to change the ulimits for systemd in these…

DiViNe
- 33
- 1
- 5