Questions tagged [ulimit]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
8 views

Change ulimit value for a user on a cPanel/WHM machine

I have a dedicated CentOS machine running WHM/cPanel. I have been noticing an app performing bad being hosted on a cPanel account. Most probably due to restrictions setup by the system admins at ...
0
votes
0answers
18 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
0answers
14 views

How to get the resources consumed so far for ulimit?

I want to run a command with a given CPU time limit, so I am using ulimit -t for this purpose from this post. I could see however that there are two exit codes either 0 or >0, to indicate whether ...
0
votes
0answers
13 views

ulimit “File Descriptors” troubleshooting: “Too many open files” [duplicate]

zsh Ubuntu 16.04: ls -l *.pdf | wc -l returns 1629. The 1629 .pdf files totals ~1.2GB. top indicate 5GB of RAM free date;qpdf --empty --pages ./*.pdf(On) -- ../concatInboxLatestFirst_batch2.pdf;...
0
votes
1answer
29 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=...
0
votes
0answers
38 views

ulimit Settings Unable to be Increased on Ubuntu 16.04

In order to try to increase the ulimit -n values to larger ones on a Ubuntu 16.04 system, I have made the following changes: Edited /etc/security/limits.conf to include * hard nofile ...
6
votes
4answers
899 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
1answer
55 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 ...
0
votes
1answer
186 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. ...
0
votes
2answers
131 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
0answers
47 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
1answer
8k 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
0answers
141 views

Where is the memlock limit in an LXC container from?

In the host shell: $ ulimit -l 65536 $ vagrant ssh --command='ulimit -l' 64 What could cause this difference? Dead ends so far: On the host and the guest /etc/security/limits.conf has no entries ...
0
votes
0answers
19 views

How to check the password age of Users from Active Directory

I am working on Linux (RHEL and SLES) and am not a Linux administrator and don't have access to a Linux administrator. The users are from Active Directory hence I am not able to find/reset the ...
0
votes
0answers
32 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
3answers
594 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
2answers
46 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
1answer
121 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
0answers
108 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 ...
2
votes
1answer
3k 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
1answer
61 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
1answer
37 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
0answers
313 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
1answer
75 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
0answers
138 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
1answer
477 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] ...
2
votes
1answer
1k 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
1answer
91 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
0answers
31 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
1answer
745 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 ...
4
votes
1answer
3k 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
1answer
31 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. ...
1
vote
1answer
3k views

Maximum value for /proc/sys/fs/file-max

Today my server crashed with Too many open files in system: but I already have high values, what is a maximum value for this? I feel like there aren't good results on google for this, explaining ...
1
vote
0answers
81 views

Limit memory usage for a single Linux process with only a function?

This is a shell script with a function timeout() to limit the CPU time usage for a single process. Is it possible to limit memory usage for a single Linux process with a similar function? #!/bin/bash ...
2
votes
1answer
270 views

shellcheck: “In POSIX sh, ulimit -H is not supported”

I am using shellcheck to fix warnings in a sh script. The script checks for the hard fd limit with: ulimit -H -n It sets the soft fd limit with: ulimit -n "$MAX_FD" This generates the shellcheck ...
0
votes
1answer
891 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, ...
1
vote
2answers
143 views

Prevent the machine being slowed down by running out of memory

My software runs a command that looks something like: find | xargs do a potentially memory hungry job The problem is that sometimes a potentially memory hungry job gets too hungry, the system gets ...
2
votes
2answers
247 views

Who would win, RLIMIT_NPROC or user namespaces?

Depending on configuration, unprivileged (non-root) processes can create a user namespace. RLIMIT_NPROC limits the number of processes per user. If I enter a user namespace, can I create processes ...
2
votes
0answers
295 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 ...
0
votes
1answer
404 views

What level is the value `ulimit -n`mean? user level or process level? [duplicate]

I want to increase the ulimit -n value,so I add * soft nofile 20000 * hard nofile 20000 in the /etc/security/limits.conf file, but there is a question confuse me all the time. what ...
3
votes
0answers
97 views

What are the differences between process data segment and resident set size? [duplicate]

I searched how to limit memory usage for a single process and found 3 results,ulimit -d, -m and -v, which stand for data seg size(process's data segment), max memory size(resident set size) and ...
1
vote
1answer
116 views

mixed results from the same command (related to ARG_MAX) [duplicate]

I'm asking a question based on this link How to cause "Argument list too long" error? From the thread, I'm seeing the equivalent error, if i'm running this: >/bin/echo `perl -e 'print "...
0
votes
1answer
3k views

Why ulimit -n modifies hard limit

Checking open files (soft) limit on current shell /home/pkaramol $ ulimit -n 1024 Checking hard limit /home/pkaramol $ ulimit -n -H 1048576 Setting (soft) limit to hard limit value and verifying ...
0
votes
1answer
1k views

ulimit configuration explanation of different types

I am setting several ulimits (system is rhel 7.5) and i can't find any clarification on the values of type. From inside the /etc/security/limits.conf i get that type can get two values while in the ...
57
votes
3answers
13k views

Why can't I crash my system with a fork bomb?

Recently I've been digging up information about processes in GNU/Linux and I met the infamous fork bomb : :(){ : | :& }; : Theoretically, it is supposed to duplicate itself infinitely until the ...
-1
votes
2answers
665 views

Beyond ulimit limit [duplicate]

I execute below command: ulimit -a And it gives output as: core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size ...
0
votes
1answer
3k views

How to permanently Set/change the Limits in Solaris 10 system wide

I received email from oracle to change the limit on solaris 10 server to make oracle application work, unfortunately i have no experience in Solaris, so need assistance Values will be like below ...
0
votes
1answer
760 views

How to make sure nproc values are taking effect for all the users?

In the /etc/security/limit.conf file I have added the following values: user1 - nproc unlimited user2 - nproc unlimited Both user1 and user2 have sudo privileges and I ...
14
votes
4answers
12k views

How to cause “Argument list too long” error? [duplicate]

Context for the question: According to POSIX specs, ARG_MAX is maximum length of command-line arguments to exec() family of functions. Which lead me to believe that's actual number of arguments, ...
1
vote
2answers
8k views

getting 'Operation not permitted' error when setting ulimit for memlock in a Docker container running ubuntu:xenial (macOS host)

I am having trouble setting the 'memlock' system limit in a container that I launch like this: docker run -it ubuntu:xenial Here is what I tried in a nutshell: In bash terminal session 1: ...