Skip to main content

Questions tagged [ulimit]

All about resource limits that can be set with the ulimit command

Filter by
Sorted by
Tagged with
2 votes
1 answer
82 views

debian 12 can not change core file size

I have this in my /etc/security/limits.conf: * soft core unlimited * hard core unlimited And no other files in /etc/security/limits.d. Added ...
inasayang's user avatar
  • 102
0 votes
1 answer
56 views

why ulimit restriction is affect by other processes?

I have some processes creating large amount of threads (using python ray module), like 32 (proc) * 120 (thread per proc). Then I found other processes would fail on creating threads while their nTH is ...
beantowel's user avatar
0 votes
0 answers
35 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 ...
klm_'s user avatar
  • 113
0 votes
1 answer
439 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. ...
tuskiomi's user avatar
  • 127
0 votes
0 answers
119 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 ...
Albert Einstein's user avatar
0 votes
1 answer
573 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: ...
heyula's user avatar
  • 21
0 votes
0 answers
320 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 ...
heyula's user avatar
  • 21
0 votes
0 answers
2k 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 ...
phanaz's user avatar
  • 189
0 votes
0 answers
433 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 ...
Alvin Novian's user avatar
1 vote
0 answers
279 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 ...
oldhomemovie's user avatar
  • 1,707
3 votes
1 answer
428 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 ...
abukaj's user avatar
  • 165
2 votes
0 answers
200 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 ...
Graham Leach-Krouse's user avatar
0 votes
1 answer
962 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 ...
aac's user avatar
  • 85
2 votes
1 answer
6k 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 ...
BugStrategy's user avatar
1 vote
3 answers
1k 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: ...
user avatar
0 votes
0 answers
948 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 '...
vudex's user avatar
  • 1
0 votes
0 answers
177 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 ...
Juntao's user avatar
  • 1
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 ...
JavaSheriff's user avatar
2 votes
1 answer
2k 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 ...
Nisk's user avatar
  • 123
0 votes
1 answer
124 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) ...
xCovelus's user avatar
  • 203
0 votes
0 answers
68 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. ...
Lazt Omen's user avatar
0 votes
0 answers
39 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@...
Eng7's user avatar
  • 1,691
0 votes
1 answer
1k 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 ...
Mathemagician's user avatar
2 votes
2 answers
2k 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 ...
Arash Payan's user avatar
0 votes
2 answers
2k 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. ...
Biedrona's user avatar
2 votes
0 answers
314 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 ...
Tamas's user avatar
  • 121
3 votes
2 answers
8k 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:~# ...
Peter Prographo's user avatar
0 votes
1 answer
1k 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 /...
HappyFace's user avatar
  • 1,620
1 vote
0 answers
501 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 ...
einpoklum's user avatar
  • 9,643
4 votes
0 answers
804 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, ...
Subrat Prasad's user avatar
2 votes
1 answer
2k 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 ...
yael's user avatar
  • 13.4k
1 vote
1 answer
2k 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 ...
dwt.bar's user avatar
  • 145
1 vote
1 answer
8k 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 ...
ron's user avatar
  • 7,162
1 vote
0 answers
306 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 ...
YoniE's user avatar
  • 11
5 votes
2 answers
10k 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=(...
sayanel's user avatar
  • 350
1 vote
1 answer
5k 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=...
irritable_phd_syndrome's user avatar
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 ...
MiniMax's user avatar
  • 4,153
1 vote
1 answer
3k 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 ...
user avatar
0 votes
1 answer
3k 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. ...
AnthonyBB's user avatar
  • 351
1 vote
2 answers
2k 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 ...
hexbit1's user avatar
  • 11
0 votes
0 answers
867 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 ...
Patrick's user avatar
8 votes
1 answer
24k 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:~#
Scott Stensland's user avatar
0 votes
0 answers
58 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/...
Dims's user avatar
  • 3,285
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 ...
Martin Vegter's user avatar
1 vote
2 answers
715 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/...
user1032531's user avatar
  • 1,917
0 votes
1 answer
803 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 ...
user387240's user avatar
0 votes
0 answers
337 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 ...
kamranonline's user avatar
6 votes
1 answer
15k 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 ...
Kingsley's user avatar
  • 297
1 vote
1 answer
409 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 ...
theTuxRacer's user avatar
  • 1,073
1 vote
1 answer
304 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 ...
leeand00's user avatar
  • 4,655