Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [ulimit]

The tag has no usage guidance.

0
votes
0answers
17 views

Why does my REST server response time increase when I have more connections

A trivial example shows that latency of responses grows rapidly with open connections. I don't understand why this is. How can I address this issue? For example: var express = require('express'); ...
0
votes
1answer
168 views

Add LimitNOFILE on haproxy init script

I want to add open files limit to HAProxy 1.8 process to 1024576. But since I use version 1.8, I cannot add LimitNOFILE to init scripts, instead of systemd file. How can I add limitNOFILE to those ...
0
votes
1answer
39 views

debian and yum packages - is there a way we can set max mem % and CPU % limits?

Is there a hard limit we can set on Debian and RPM packages? My thought is to put 20% CPU, 20% Memory and 200 MB Disk Usage hard limits. So the package can play within those limits and not beyond that....
1
vote
0answers
225 views

change maximum number of open files for user on solaris 9

i need to change ulimit -n for the user permanently, on solaris 10 you can do projadd -K "process.max-file-descriptor=(basic,8192,deny)" proj.files but on solaris 9 projadd or projmod doesn't have -K ...
0
votes
1answer
409 views

ulimit for root keeps resetting

Using CentOS 6.6 In /etc/security/limits.conf I have set the following: * soft nofile 65535 * hard nofile 65535 root soft nofile 65535 root hard nofile 65535 In etc/security/limits.d/90-nproc.conf ...
0
votes
1answer
670 views

Where does Linux get ulimit values for certain users?

I see that different users in my Debian system has different max open files limits. I read the post but would like to get some understanding of the details. I do not have any settings into /etc/...
5
votes
1answer
245 views

How to change stack depth limits in /etc/security/limits.d/ and have the changes apply to services at boot

My system Series of Ubuntu 14.04.5 (x86_64) Servers, kept updated My application required I increase stack depth for postgres I created a file in /etc/security/limits.d/myapplication.conf The ...
0
votes
1answer
148 views

seting rtprio limit in system without PAM

I have minimal linux system without PAM (custom complied linux based appliance) and I want to set system wide (all users) rtprio to 99. My idea is to do this with help of sysctl. But looking on ...
0
votes
1answer
46 views

systemd DefaultLimitCPUSoft?

I discovered that on my Ubuntu 16.04 VPS a process is getting killed due to CPU usage. Running ulimit -t shows 86400. systemctl show | grep LimitCPU shows DefaultLimitCPU=18446744073709551615 ...
0
votes
1answer
718 views

RHEL setting a user specific max number of open files

I've set up below values in /etc/security/limits.conf in my RHEL machine. * hard nofile 65535 @student hard nofile 100000 Is this the correct approach when setting a user specific max number of ...
0
votes
1answer
557 views

Where is default soft limit config file debian?

I have a process running as root that is capped to 1024 ( in reality lsof shows me up to 1031 for it) open files but I don't find the file to modify this limit. Here is the output of cat /proc/PID/...
1
vote
1answer
712 views

Could not set limit for 'nofile' - “Operation not permitted” in a LXD unprivileged container

I am running a centos7 unprivileged LXD container on a ubuntu 17.04 host. I have a problem setting ulimit for NOFILE inside the container, if it is running in unprivileged mode. Bellow are the steps ...
0
votes
1answer
2k views

unable to set higher ulimit value for max open files

On Ubuntu 16.04 AWS system with 32 GB ram and 4 CPU, the following commands fail, root@ip-10-0-0-189:/home/ubuntu# sysctl -w fs.file-max=10000000 **(ten million)** fs.file-max = 10000000 root@ip-10-0-...
1
vote
1answer
488 views

How to set max file descriptors for a container?

I want to run elasticsearch in a container (namely nspawn) and it requires the number of max file descriptors to be higher than the default 1024. This is done, in the container, in the systemd ...
0
votes
1answer
423 views

Ubuntu 16.10 Server MariaDB (MySql) open_file_limit won't go higher than 16364

I'm running on Ubuntu 16.10 (yakkety yak) with MariaDB 10.x and experience the very same issue as Ubuntu 16.04 Server MySql open_file_limit won't go higher than 65536 with one exception, my open ...
1
vote
0answers
200 views

ulimit not reflected for Jenkins master which is running on Red Hat

I already saw "ulimit not reflected for jenkins slave" and the steps did not work for me. Please, help. I am using Jenkins on Red Hat and I have the same problem. I set ulimit to 99999 and when I ...
0
votes
0answers
73 views

Cannot login via ssh into CentOs machine after setting ulimit for open files to unlimited [duplicate]

I have set ulimit for open files on my centos machine by editing /etc/security/limits.conf post which I am unable to login into the machine. This was the change made in /etc/security/limits.conf file....
0
votes
1answer
1k views

mpm_prefork:error (11)Resource temporarily unavailable: AH00159: fork: Unable to fork new process

After having some issues I have rebuilt my server on a new, clean Fedora 24 platform. It's a fairly busy server, and now when it starts up, I get a flood of these messges in apache's error_log: [Thu ...
0
votes
0answers
223 views

xtrabackup: too many open files (more than 1048576)

When using xtrabackup to backup a mysql database with lots of tables, the proces fails with Error 24: ‘Too many open files’. This is a FAQ on the Percona website: https://www.percona.com/doc/percona-...
0
votes
1answer
152 views

Linux - Open file inheritance

For testing, I've changed my global open file limit to 3000: #sysctl -w fs.file-max=3000 fs.file-max = 3000 #cat /proc/sys/fs/file-nr 2016 0 3000 I've created some files: i=1; while [ "$...
1
vote
0answers
225 views

Nginx at startup does not have fd limit set in /etc/security/limits.conf

I have the following configuration for increasing the number of file descriptors available to processes of all users. cat /etc/security/limits.conf * hard nofile 65536 * soft nofile 65536 When the ...
1
vote
0answers
146 views

Unable to access Ubuntu EC2 ssh, Connection to Server-IP Closed

My server was having error due to high traffic and it showed this message often when I access the website Error: EMFILE: too many open files, open '/home/ubuntu/chat2/public/style.css' at Error (...
16
votes
1answer
10k views

Ubuntu 16.04 Server MySql open_file_limit won't go higher than 65536

I'm running Ubuntu 16.04 Server on XenServer and I'm running into an issue with MySql's open file limit. Here's what I've done so far: sudo nano /etc/security/limits.conf (reference) * soft nofile ...
0
votes
0answers
523 views

can't set nofile more than 65536

I use debian 8 x64. I'm trying set max open file value to 2097152, but get only 65536. root@server:/backups# sysctl fs.file-max fs.file-max = 2097152 root@server:/etc/security# egrep -v '^#|^$' ...
6
votes
2answers
710 views

proc's limit and ulimit -f don't match

I have an issue where a process has a different max file size than the ulimit for a user. The log file for this process is basically not growing past 524288 proc: less /proc/20238/limits Limit ...
1
vote
0answers
324 views

Force nproc ulimit on non interactive user

I have a script that can be launched n times at the same time through php-fpm. php-fpm pool is set to run under a certain username and I want to limit the number of processes this username can launch. ...
3
votes
2answers
5k views

Getting Too many Open files error for Postgres

In Ubuntu 14.04 server on a JAVA application we are getting Too many Open files error for Postgres (Using Postgresql 9.5). We set the following in /etc/security/limits.conf * soft nofile 16384 * ...
1
vote
1answer
2k views

prlimit not found centos6.3

After finding out that ulimit -m no longer does anything on linux... I am now investigating the use of prlimit. I have found that this is supposed to exists as part of util-linux / util-linux-ng, I ...
1
vote
2answers
4k views

How do ulimit settings impact Linux?

Lately, I had a EAGAIN error with some async code that made me take a closer look at ulimit settings. While I clearly understand certain limits, such as nofile, others are still quite confused to me. ...
2
votes
1answer
2k views

How do I increase the open file limit on Linux?

I am using CentOS 7. I found out that the current value can be seen using $ ulimit -a (look for open files). Or just $ ulimit -n Then I try to edit these limits by editing the file at $ vim /etc/...
0
votes
0answers
1k views

File descriptor limit on CentOS 7

I am having hard time understanding resource limits (ulimit) with systemd. As I understand it, systemd brings some additional complexities to setting file descriptor limit. /etc/security/limits.d/99-...
0
votes
1answer
1k views

increase max_connections in mysql on ubuntu wily

I have ubuntu wily installed on my server. I'm trying to increase max_connections of mysql server to 1237 but when running mysql client and executing show variables like 'max_connections'; i get 214. ...
2
votes
1answer
1k views

How does nginx websocket proxy work?

I'm wondered about how nginx handles tons active websocket connections? There is a lot of limitations, like a number of open files, maximum of 65k TCP connections between IP <-> (IP, port) and so ...
0
votes
2answers
769 views

Can't raise nginx max files opened limit

I'm running Ubuntu Server. This is what I've done: /etc/security/limits.conf: * soft nofile 10240 * hard nofile 10240 And added in /etc/pam.d/...
4
votes
1answer
2k views

How to apply memory limits to all cron jobs?

On a shared server (Debian Jessie), there are some memory limits (and other limits, like number of processes) that apply for a group of users, configured in /etc/security/limits.conf. It seems that ...
2
votes
2answers
1k views

Optimize Apache for high concurrent requests

I am running a Apache2 Ubuntu server which serves the API request from mobile apps. Recently I am facing a bottleneck that when the request getting higher (more concurrent users), the request ...
1
vote
2answers
6k views

pam_limits: Operation not permitted for sshd

Debian 8.0, pam 1.1.8-3.1, sshd 1:6.7p1-5. I'm trying to permanently increase the maximum number of open files. In /etc/pam.d/ I've got: /etc/pam.d# grep pam_limits.so * atd:session required ...
1
vote
1answer
204 views

How does pam_limits decide on the default limits?

In a linux system that is using the pam_limits module, but has nothing configured in /etc/security/limits.conf (or /etc/security/limits.d/*) how does pam_limits decided on what limits to implement?
2
votes
1answer
233 views

Process has more open sockets than should be allowed by prlimit

Running debian jessie. The following is done as root to avoid any permissions issues. First I find the pid of my program, then I check its open file limit to verify that it is set at 1024. But when I ...
2
votes
1answer
768 views

Forcing a user to use swap space after certain memory usage (using limits.conf?)

I have a backend app that is being used internally by developers hosted on our server, however, the app unfortunately requires the use of Passenger and Ruby, both of which are very memory-hungry. I ...
3
votes
3answers
2k views

How to limit Apache sub-process memory usage? [duplicate]

— Yeah, just that simple question. It's too easy to consume a lot of RAM in brain-dead mod_XxX (say, mod_php) application, so I'm just wondering what does Apache allow to do as countermeasure.
13
votes
3answers
43k views

How can I permanently set ulimit -n 8192 in Centos 7?

I would like to permanently set the open file limit for all users in Centos 7, but there seems to be a lot of conflicting information out there on the googles.
3
votes
0answers
492 views

“Open files” ulimit applied only when using 'su - userX' but not when I SSH into server

I'm running Ubuntu 12.04. My problem is that the ulimit values described in limits.conf are not being applied when I SSH into my server using a non root account. Either that or they are being applied ...
5
votes
1answer
432 views

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-...
13
votes
3answers
16k views

Ulimit file descriptor limits not being applied for particular process

I recently checked one of our redis processes to what ulimits where applied using: cat /proc/<redis-pid>/limits And was suprised to learn that is was at the low default value: Limit ...
11
votes
2answers
28k views

nginx uLimit 'worker_connections exceed open file resource limit: 1024'

I keep getting this error in nginx/error.log and its driving me nuts: 8096 worker_connections exceed open file resource limit: 1024 I've tried everything I can think of and cant figure out what is ...
16
votes
2answers
56k views

Increasing ulimit on CentOS

We have a CentOS box that I'm trying to increase the max number of files that a user can have open. Currently when I run ulimit -Sn I get 1024 and ulimit -Hn gives 4096. I need that number up around ...
1
vote
1answer
5k views

How do I increase the curr_connections limit using memcache?

I am using a server with Centos 6.5 64 bits Kernel 2.6.32 and 64 GB RAM and 12 threads cores, and I cannot get increase the current connections used in memcache. This is my STATS output: # echo ...
9
votes
4answers
18k views

Why does redis report limit of 1024 files even after update to limits.conf?

I see this error at the top of my redis.log file: Current maximum open files is 1024. maxclients has been reduced to 4064 to compensate for low ulimit. I have followed these steps to the letter (...
1
vote
1answer
520 views

ulimit value when output is “hard” or “soft”

Can someone explain to me how can I determine actual values of for ulimit when the output of ulimit command is "hard" or "soft". This is on AIX machine. For example: # ulimit -f hard And on another ...