Stack Exchange Network

Stack Exchange network consists of 175 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

All Questions

Tagged with
0
votes
1answer
15 views

Setting soft limit above hard does not fail in terms of exit code?

root@Andromeda:/# ulimit -n -S 2048 root@Andromeda:/# ulimit -n -H 2048 root@Andromeda:/# ulimit -n -S 4096 2048 root@Andromeda:/# echo $? 0 Failure to set soft limit above the hard one makes sense. ...
0
votes
1answer
163 views

Open file limits not increased for redis user despite change in /etc/security/limits.conf

I got ERR max number of clients reached from my redis server so I decidied to increase the allowed max client connections in its configuration. This also requires according to the documentation, ...
2
votes
0answers
119 views

Restart a process if cpu usage is more than 90% for more than a 60sec

Normally one of my systemd services will take about 0...5% cpu Usage. In some cases it can reach up to 100% but only for some seconds. If the Service "crashes" it takes up to 100% continuously. So I ...
2
votes
1answer
2k views

ulimit vs file-max

Could someone explain limit on open files in linux? The problem is that one of my applications if reporting "Too many open files". I have ulimit -n 1024 but cat /proc/sys/fs/file-max 6578523 and ...
2
votes
0answers
99 views

How to check usage of mqueues reliably?

I run a testing server for a software that depends on the massive usage of mqueues (POSIX messages queues). I increased limits to a reasonable level and got it working a long time ago. However, the ...
2
votes
3answers
7k views

Increasing open files limit for all processes: Do I need to set Soft/Hard limits?

I'm trying to fix the following error that I get after a day or two of running my game server. 2017/12/13 12:08:35 http: Accept error: accept tcp [::]:8081: accept4: too many open files; retrying in ...
0
votes
1answer
834 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
2k views

Ulimit values in limits.conf vs 20-nproc.conf

In a CentOS/RHEL machine, the limit of user processes can be defined in /etc/security/limits.conf as well as in /etc/security/limits.d/20-nproc.conf What is the difference in those two values ...
6
votes
2answers
9k views

/etc/security/limits.conf not applied

I have /etc/security/limits.conf, that seems not been applied: a soft nofile 1048576 # default: 1024 a hard nofile 2097152 a soft noproc 262144 # default 128039 a hard noproc 524288 Where a is my ...
9
votes
1answer
21k views

Fixing ulimit: open files: cannot modify limit: Operation not permitted

I tested this on different GNU/Linux installations: perl -e 'while(1){open($a{$b++}, "<" ,"/dev/null") or die $b;print " $b"}' System A and D The first limit I hit is 1024. It is easily raised ...
1
vote
3answers
3k views

How to kill the processes when no root permission and nproc limit exceeded?

So, a user had exceeded her nproc limit. Due to this, both SSH and su are unable to login as the target user. However, there is no accessible shell which is owned by the user. How can this be solved ...
1
vote
1answer
1k views

ulimit vs /etc/security/limits.conf

What is the difference between: a) using the ulimit command to set a limit on a resource? b) editing the /etc/security/limits.conf file for the same purpose? e.g. what is the entry that should be ...
2
votes
0answers
161 views

How to report current usage for a user on ulimits aka pam_limits etc?

Every SA sooner or later runs into a user hitting a ulimit like open files or number of processes. There must be a simple mechanism to track and test against usage of these limits, or ulimits would ...
2
votes
2answers
8k 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 the ...
4
votes
2answers
4k 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 ...
2
votes
1answer
1k 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 higher ...
1
vote
0answers
119 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
28 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 ...
3
votes
1answer
5k 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 ...
3
votes
2answers
12k 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/...
4
votes
1answer
945 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 -p ...
1
vote
1answer
3k 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 ...
8
votes
1answer
19k 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?
2
votes
0answers
677 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 ...
139
votes
5answers
283k 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 ...
0
votes
1answer
472 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?
8
votes
2answers
15k 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 ...
23
votes
4answers
56k 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 ...
10
votes
2answers
2k 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 ...
9
votes
1answer
39k 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
0answers
2k 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?
30
votes
4answers
34k 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 ...
30
votes
5answers
105k views

How can I increase open files limit for all processes?

I can use ulimit but I think that only affects my shell session. I want the limit increased for all processes. This is on Red Hat.