Questions tagged [ulimit]
All about resource limits that can be set with the ulimit command
188
questions
0
votes
1
answer
39
views
`ulimit` a shell, not a user
We're multiple user to work on a same account
I want to limit my activities to not hang the computer, to not bother the other users. I want to limit my resources' usage to not use it all (because if a ...
0
votes
0
answers
20
views
At some point during the execution of a process, core dumps stop being generated
I know there are plenty of similar questions, but I didn't find any info about my case.
I have a working setup for core dump generation on my Ubuntu - the limits are unlimited, the pattern is set, ...
0
votes
1
answer
213
views
How can I set 'ulimit -n' permanently? Ubuntu Server 20.04 LTS
I want to set ulimit -n permanently.
I've tried with adding this to /etc/security/limits.conf
* soft cpu nofile 1048576
* hard cpu nofile 1048576
and with editing /proc/sys/fs/file-max
After ...
0
votes
3
answers
28
views
Why am I hitting file number limit prematurely?
A custom application running on one of our development systems (Ubuntu 21.10 Desktop) is bombing out with the error socket: Too many open files. So I immediately checked the limits. Here's the output:
...
0
votes
0
answers
108
views
Can't set fs.nr_open limit via sysctl
I'm trying to set fs.nr_open via sysctl (for learning purpose) to different value, other than default 1048576
These are sysctl settings after system was booted:
vud@ubuntu:~$ sudo sysctl -a | grep -E '...
0
votes
0
answers
25
views
limits.conf priorities
Does a wildcard have priority over an individual limit? In the example below, will the limit for * be applied to all users including bar or all users except bar?
bar - nofile ...
1
vote
2
answers
214
views
Number of Open Files - soft nofile vs ULIMIT
vendor software configuration requires these settings on our Linux server:
xerox soft nofile 16384
xerox hard nofile 262144
in file
/etc/security/limits.conf
Because of security consideration is it ...
1
vote
1
answer
245
views
Can you set RLIMIT_NOFILE to RLIM_INFINITY?
I'm using setrlimit() from within my C++ code to try and set the RLIMIT_NOFILE to RLIM_INFINITY (getrlimit then set rlim_cur & rlim_max to RLIM_INFINITY and setrlimit()), but I get "Operation ...
0
votes
1
answer
26
views
RabbitMQ, SCP in Linux dropping connections
In GNU/Linux I have an issue with an application I have made.
It works in my development environment, most of the components running in dockers or natively, but it randomly (often, but not always) ...
0
votes
0
answers
35
views
Increase max file count in ntfs drive
As of late. I started getting an error of no space in drive when installing node apps although I have lots of free space. After some digging I found out that the problem is when having to many files.
...
0
votes
0
answers
37
views
CentOS: ulimit hard/soft limits keep reset to default values [duplicate]
On CentOS7 I am trying to change the values of ulimit as following:
ulimit -Hn 262144
ulimit -Sn 100000
But due to some unknown trigger, the value is being reset to its default values:
[root@...
0
votes
1
answer
67
views
How core file ended up on my system when its limit was set to 0?
A file named core appeared on my desktop after a reboot. I checked it using file core and it seemed that it was created by VLC. The strange thing is when I checked the limit on core files' size using ...
2
votes
2
answers
125
views
Too many open files despite a sufficiently high open files limit
I'm running a daemon that routinely stats and opens files. It also copies the data from these files over the network to various cloud providers. The daemon runs as a single process. After the process ...
0
votes
0
answers
23
views
CentOS: Connections limit per port for Redis
I am using Redis caching server on CentOS, where Redis accepts clients connections on the configured listening TCP port. I am trying to figure out the limits applied by the operating system to the ...
0
votes
2
answers
521
views
ulimit: what is the maximum core file size value
I want to set unlimited core file size with ulimit inside docker. I can't do this by
ulimit -c unlimited
because parameters for docker are set by framework, that doesn't accept unlimited parameter. ...
1
vote
0
answers
116
views
How can lsof report a higher number than the ulimit?
From time to time some user consumes all the file descriptors (FDs) on a RHEL Linux machine. I have started logging the FDs per user to see the actual state. The logging is run as root to have access ...
1
vote
2
answers
1k
views
Can't set ulimit -n like I want to
I just want to set ulimit -n (per process max open files) and for the setting to survive reboots, but it's proving difficult.
I don't know where else to change things to allow it to be set.
root@z:~# ...
0
votes
1
answer
188
views
Is the value returned by `ulimit -Hn` an optimistic limit or a tight, achievable limit?
On my Linux machine, I have:
❯ ulimit -Sn # Check soft limit
ulimit -Hn # Check hard limit
1024
1048576
Does this mean that I can increase my max open files to 1048576, regardless of /...
1
vote
0
answers
245
views
How to best hard-limit my Firefox' memory hogging?
I use Firefox 83 on my Devuan GNU/Linux Beowulf desktop.
Unfortunately, for reasons which are not clear to me, FF has memory issues which cause it to gradually take up more and more of my system's ...
2
votes
0
answers
127
views
Limit GPU Resource to a particular process
The ulimit command can limit the memory to a process in the Linux machine. Similarly, is there any command in Linux to run a process with limited GPU resource. For example, I have a 64 GB GPU machine, ...
1
vote
1
answer
344
views
how to verify current open files on specific service
on our rhel server 7.6 version we have the following systemctl service
/etc/systemd/system/test-infra.service
and the value of LimitNOFILE is
systemctl show test-infra.service | grep LimitNOFILE
...
0
votes
1
answer
620
views
parallel: Warning: No more file handles
I am running GNU parallel and after some time I am getting:
parallel: Warning: no more file handles Raising ulimit -n or etc/security/limits.conf may help.
What argument would be appropriate to add ...
0
votes
1
answer
3k
views
rhel 7 setting stack size to unlimited
I have some old code that needs the stack to not be limited to 8192kb in order for it to run.
I am used to doing this in /etc/security/limits.conf
* stack hard unlimited
* stack soft ...
1
vote
0
answers
172
views
Open Files difference between host and container
I have a Golang application that receives a high volume of traffic and should keep a low latency SLA. Recently we are investigating if the fact that we are running the application in a Docker ...
0
votes
0
answers
590
views
Setting a max memory limit for process with ulimit
So I've learned that its hella easy to make a memory leak in C :
#include <stdio.h>
void main() {
int* p;
int i=0;
p=(int*)malloc(sizeof(int));
while (p!=NULL) {
p=(...
0
votes
1
answer
2k
views
Enabling core files on CentOS 8.1
I am trying to debug a broken application that renders X11 windows. I am running CentOS 8.1.
I have followed the instructions per Redhat on enabling core dumps.
I have enabled DefaultLimitCORE=...
6
votes
4
answers
1k
views
How calculate the number of files which can be passed as arguments to some command for batch processing?
For example, I have directory with multiple files created by this way:
touch files/{1..10231}_file.txt
I want to move them into new directory new_files_dir.
The simplest way to do this is:
for ...
1
vote
1
answer
461
views
How can I limit the CPU usage (% of CPU)?
It happened to me multiple times now that a program which entered an infinite loop made the entire machine completely unresponsive, one time even foreign JavaScript, and I had to power off. This is ...
1
vote
1
answer
875
views
Soft limit not being set for application [ulimit]
I am trying to increase the max open files for an application but my attempts have been unsuccessful. The hard limit is being set appropriately, but the soft limit is staying as the default 1024.
...
1
vote
2
answers
941
views
Confused about the diff between /etc/sysctl.conf vs /etc/security/limits.conf
I am on an Ubuntu18.04.1 bionic VM in the Azure cloud. I am trying to set the maximum number of file descriptors at the system level.
When I initially logged in and ran ulimit -n I get a value of ...
0
votes
0
answers
257
views
nofile doesn't work as described in limits.conf
We encountered an issue in production, I suspect it may be caused by hitting the nofile limit, but I cannot find trace or direct proof. We are running on RHEL 7. I used lsof command below to find ...
4
votes
1
answer
14k
views
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
seeing this when executing sudo from inside a docker container (ubuntu 18.04) when parent host is ubuntu 20.04
sudo -i
sudo: setrlimit(RLIMIT_CORE): Operation not permitted
root@devops:~#
0
votes
0
answers
35
views
How can df report different information depending in it's target path?
Example:
root@myinstance:/my/instance/path# df -h
Filesystem Size Used Avail Use% Mounted on
...
/dev/mapper/hdd-place 13T 899G 12T 8% /run/iss
...
root@myinstance:/my/instance/...
7
votes
3
answers
1k
views
Chromium browser: exceed data ulimit
I have set ulimit in /etc/security/limits.conf. When I log in into my desktop environment as user testuser normally (using slim login manager), everything works fine.
When I log in as user testuser ...
1
vote
2
answers
172
views
Recommended ulimit values for Centos7
Trying to configure PHP to perform a core dump, I executed the following:
[root@myserver ~]# echo '/tmp/core-%e.%p' > /proc/sys/kernel/core_pattern
[root@myserver ~]# echo 0 > /proc/sys/kernel/...
0
votes
1
answer
295
views
increase maximum number of open files (ulimit)
I need to increase the files limit on my system (for running on large files in Spark).
The release of linux on my server is:
Redhat Release: Red Hat Enterprise Linux Server release 7.6 (Maipo)
I ...
0
votes
0
answers
227
views
Limit file size per user
I tried to limit file size per user. I use limits.conf with fsize size config but its limit when user tried to make files from shell !
I want to limit from FTP , FileManager , PHP ,... files owners ...
3
votes
1
answer
8k
views
ulimit for stack size - per process or per thread limit?
So we have a program on Solaris which was running out of stack space.
While investigating this, I had a brief look at what ulimit was for the stack:
user@solaris-box:~$ ulimit -a
...
stack size ...
1
vote
1
answer
136
views
Determining source of ulimit change
I have a server built with AWS OpsWOrks, so everything is in configuration. There is a process whose ulimit is set to 4096, as checked from /proc/$PID/limits. This process runs as root. I ran the ...
1
vote
1
answer
143
views
Can I use ulimit to prevent a system from overheating and rebooting?
I was just informed about the joys of ulimit.
And it got me thinking...if I have a system with an old processor that keeps overheating, and let's say for sake of example; no other hardware that I ...
1
vote
0
answers
579
views
Can't use remote server because too many open files in system
I'm running some python programs in the background of a remote Ubuntu machine. The program opens too many files that exceed the system limit.
I want to ssh to the remote server now, but I can't ...
0
votes
1
answer
175
views
Difference between pid_max/ulimit. How to create fake processes?
I am trying to learn the nuances between pid_max and setting user limits through ulimit. My understanding is that, no matter how high you set the user limits (for example setting user max processes to ...
1
vote
0
answers
288
views
Why don't my audio.conf settings cause me to get an unlimited value for ulimit -l?
I am attempting to set the relevant resource limits for some low-latency audio work. I have created an audio group, and I believe that I am in that group based on the following:
~$ groups
kevin adm ...
0
votes
1
answer
1k
views
system MemoryMax by percentage not working?
I am trying to configure my .service file to limit how much memory a given service can use up before being terminated, by percentage of system memory (10% as an upper limit in this case):
[Unit]
...
3
votes
1
answer
4k
views
Change the resource limits (ulimit / rlimit) of a running process
I have a long-running process that is hitting a resource limit, such as the maximum number of open files.
I don't want to kill it.
Usually, you'd do:
(stop service)
ulimit -n <new limit>
(...
0
votes
1
answer
171
views
ulimit - one service affects another
We are hosting 2 services on our RHEL 7.4 server: Jupyterlab and RStudio. Jupyterlab sessions of individual users tend to open a lot of files:
# lsof|grep e613664|wc -l
31581
Our problem is that the ...
1
vote
0
answers
63
views
linux mint ulimit configuration
In my Linux Mint desktop, ulimit -Hs shows values greater than fs.file-max. As far as I know it should be smaller values than the system-wide settings. Is this OK for Debian-based systems or do I have ...
-1
votes
1
answer
1k
views
hive + what is the meaning of nofile and nproc
regarding to hive in hadoop cluster
what is the meaning of the following
hive - nofile 30000
hive - nproc 18000
the file:
more /etc/security/limits.d/hive.conf
# Licensed to the Apache ...
5
votes
1
answer
6k
views
'pthread_create: Resource temporarily unavailable' when running multiple docker instances
TLDR
When spinning up multiple docker containers in which I run npm ci, I start getting pthread_create: Resource temporarily unavailable errors (less than 5 docker containers can run fine). I deduce ...
0
votes
1
answer
46
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.
...