Questions tagged [ulimit]
All about resource limits that can be set with the ulimit command
196
questions
0
votes
0
answers
24
views
CentOS Stream - dotnet app works on root but is killed on regular user
I have a dotnet application. It requires quite a lot of memory. Everything worked on CentOS 8, but on a fresh CentOS Stream installation weird things are happening...
If I run that all as regular user ...
0
votes
1
answer
64
views
How to limit Video RAM usage on linux?
some processes on my computer are using way too much video card memory for the tasks they're doing. I'd like to impose a limit on these tasks to have the OS limit the on-card RAM usage of these tasks. ...
0
votes
0
answers
69
views
Time, Memory Limit and Timeout for Python Command Only
I want to enforce timeout of 5s to python command and at the same time want to measure the execution time for python command (taking into account that python3 command memory limit is 256 MB), what I ...
0
votes
1
answer
121
views
Ulimit change the max number of open files?
I needed to increase the maximum number of open files for a program run and I used ulimit -n new_max_number. I tried it several times and it works some of the times, and gives error of -bash: ulimit: ...
0
votes
0
answers
111
views
merging from 1022 files open Too many open files error?
I use samtools for coordinate sort a bam file. This command creates lots of files while running.
I run the following command
samtools sort -o sorted.bam genomic_dataset.bam
But it gives the following ...
0
votes
0
answers
633
views
fork: Resource temporarily unavailable - on CentOS server
I can't run anything anymore (hardly anything) and I keep getting the following error message. If I execute a command, it can be it comes several times the error fork: retry: No child processes, if I ...
0
votes
0
answers
196
views
Change soft limit of file descriptors on Fedora
I've encountered an issue that require me to increase the max open file descriptors for Chrome. However, I did not have luck and the value seems to stuck at 1024 and I can't increase it. I'm using ...
1
vote
0
answers
148
views
In the middle of "Too many files open" mess
I am in the middle of "file limit" mess and I am not sure what to do.
I am sure restarting the system will help for a while. However, could someone point me in the right direction for tools ...
3
votes
1
answer
351
views
Is the kilobyte used by time and ulimit commands either 1000 (SI) or 1024 (old school) bytes?
From man time:
M Maximum resident set size of the process during its lifetime, in Kilobytes.
From ulimit -a:
max memory size (kbytes, -m) unlimited
But a "kilobyte" may mean ...
2
votes
0
answers
145
views
How are ulimits determined for processes running in unpriviledged containers?
Recently, while I was building something in an unprivileged nspawn container (for CI), with the host system running arch linux, I repeatedly ran into an EMFILE error, from yarn, indicating that I'm ...
0
votes
1
answer
603
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 ...
1
vote
1
answer
4k
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 ...
1
vote
3
answers
610
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
625
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
100
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
2k
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 ...
2
votes
1
answer
1k
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
89
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
59
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
928
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
789
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
2
answers
1k
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. ...
2
votes
0
answers
260
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 ...
2
votes
2
answers
5k
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
816
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
384
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 ...
3
votes
0
answers
598
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
1k
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
...
1
vote
1
answer
1k
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
6k
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
277
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 ...
2
votes
2
answers
4k
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=(...
1
vote
1
answer
4k
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
2k
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
2k
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
1k
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
706
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 ...
7
votes
1
answer
21k
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
46
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
2k
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
604
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
749
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
319
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 ...
4
votes
1
answer
13k
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
269
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
241
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
843
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
246
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 ...