Questions tagged [ulimit]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
38 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
17 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
31 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/...
1
vote
3answers
210 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
34 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
58 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
43 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
292 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
47 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
33 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 ...
0
votes
0answers
155 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
43 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 ...
0
votes
0answers
67 views

kernel.pid_max, kernel.threads-max, and ulimit -u

What are the differences of this? I am so confused. 1) If kernel.pid_max is the maximum number of PID that kernel can assign, then why is there a kernel.threads-max if there is already a kernel....
0
votes
0answers
49 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
174 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] ...
1
vote
1answer
247 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
64 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 ...
0
votes
0answers
154 views

How to reset ulimit -s

I was playing around the stack size and set ulimit -s 1. After that I could not re-set it to 8192 and ulimit -s 8192 bash: ulimit: stack size: cannot modify limit: Operation not permitted while ...
1
vote
0answers
23 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
373 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
2k 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
24 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
0answers
125 views

No locks available

I am using ssh logging on a remote server and ran a parallel computing application. I use htop to monitor the CPU usage. But after running a long time, htop exit and shows: htop: too may open files ...
0
votes
1answer
1k 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
64 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
170 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
698 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
78 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
172 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
240 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
310 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
72 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
90 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
2k 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
859 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 ...
55
votes
3answers
12k 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
559 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
2k 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
505 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 ...
13
votes
4answers
9k 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
6k 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: ...
6
votes
1answer
7k views

Meaning of the values for ulimit memlock flag

When I run docker and use the --ulimit memlock=-1:-1 option, what do the soft/hard values of -1 mean? Does it mean that I am allowing an unlimited amount memory to be locked by this container/process?
3
votes
1answer
5k 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 ...
0
votes
1answer
406 views

Are the limits shown or set by ulimit per resource and per process?

Bash's ulimit concerns about limits on different kinds of resources. Is it correct a limit shown or set by ulimit is per-resource? Is each such limit the sum of the resources available to all the ...
4
votes
5answers
3k views

Why does the following way not change core file limit size?

To solve the problem in https://unix.stackexchange.com/a/446428/674, I followed https://stackoverflow.com/a/17483998/156458, but it doesn't set core file limit size? $ sudo sh -c "ulimit -c 1024 &...
3
votes
1answer
2k views

Is setting ulimit -v sufficient to avoid memory leak

We have a process that in recent weeks had a once-off memory leak that resulted in it consuming all memory on our RHEL 7 box We now wish to set limits around this such that it will never take any ...
5
votes
1answer
11k views

Where is the limit set? bash: fork: retry: No child processes

This: $ seq 100000 | xargs -P0 -n1 -I {} bash -c 'echo {};sleep {}' : 5514 bash: fork: retry: No child processes started complaining around 5500 when the system had 11666 processes running. Now, ...
0
votes
1answer
4k views

How can I automatically set the core dump size on a single user?

I am running OpenSUSE. I usually open the console with an interactive non-login shell bash, and frequently use tcsh after logon. I am writing some C code, compiling with gcc, and I'd like to have the ...
4
votes
1answer
7k views

Increase number of open files in mac high sierra [duplicate]

On a mac high sierra 10.13.3 I have 256 open files. I want to raise it and I open a terminal and enter sudo launchctl limit maxfiles 1000000 1000000 This doesnt change anything when I enter ulimit ...
4
votes
0answers
7k views

How to increase the maximum number of open files on Fedora?

I want to increase the maximum number of open files in Fedora 27, since the default settings are too low: $ ulimit -Sn 1024 $ ulimit -Hn 4096 First, I ensure that the system-wide setting is high ...