Questions tagged [limit]

Limiting the usage of a resource (memory, disk space, CPU time, open files, network bandwidth, …) by a process or a group of processes.

Filter by
Sorted by
Tagged with
3
votes
1answer
1k views

Do files opened by child processes count against the file open limit for the parent process?

On Mac or Linux if you use the command ulimit -n you can see the page open limit for what seems to be an individual process according to this stackoverflow post. So if a parent process spawns child ...
22
votes
2answers
5k views

Why is socket path length limited to a hundred chars?

On Unix systems path names have usually virtually no length limitation (well, 4096 characters on Linux)... except for socket files paths which are limited to around 100 characters (107 characters on ...
0
votes
1answer
3k views

Ulimit values in limits.conf vs 20-nproc.conf

In a CentOS/RHEL machine, the limit of user processes can be defined in /etc/security/limits.conf as well as in /etc/security/limits.d/20-nproc.conf What is the difference in those two values ...
1
vote
1answer
1k views

Curl parallel download file list

first post sorry if I did some mess here =) Using Ubuntu 14.04lts 64bits server version. I have a list (url.list) with only URLs to download, one per line, that looks like this: http://domain.com/...
11
votes
2answers
16k views

/etc/security/limits.conf not applied

I have /etc/security/limits.conf, that seems not been applied: a soft nofile 1048576 # default: 1024 a hard nofile 2097152 a soft noproc 262144 # default 128039 a hard noproc 524288 Where a is my ...
2
votes
2answers
2k views

Time limit for bash script

I have bash script and I would like to set time limit for it. For example if scripts runs longer than 50s, exit with 0. It should be done inside script, I can not change the command how script is ...
5
votes
0answers
419 views

Limiting per process dirty bytes without slowing down the whole system

Given a busy system with a really fast block device (highend NVMe raid, 2 GB/s write, 4 GB/s read) mounted at /data and an a really slow device (USB HDD with spinning 8 TB disk, 50 MB/s write, 60 MB/s ...
2
votes
2answers
2k views

Command line length limit: built-in vs executable

So per POSIX specification we have the following definition for *: Expands to the positional parameters, starting from one, initially producing one field for each positional parameter that is set....
13
votes
1answer
33k views

Fixing ulimit: open files: cannot modify limit: Operation not permitted

I tested this on different GNU/Linux installations: perl -e 'while(1){open($a{$b++}, "<" ,"/dev/null") or die $b;print " $b"}' System A and D The first limit I hit is 1024. It is easily raised ...
3
votes
1answer
2k views

Setting a long environment variable breaks a lot of commands

I've been seeing a strange behavior when messing up with the environment variables. I'm setting up a very long environment variable and this prevent launching any command: ( Ubuntu 14.04.5 LTS (GNU/...
1
vote
0answers
106 views

CentOS 7 tweaking sshd config to access the machine no matter how busy its

When CentOS 7 free memory goes below 200 MB, it become unresponsive even to ssh connection. Currently I have many machines not accessible remotely in peak time due to free memory being between 80 MB ...
1
vote
3answers
5k views

How to kill the processes when no root permission and nproc limit exceeded?

So, a user had exceeded her nproc limit. Due to this, both SSH and su are unable to login as the target user. However, there is no accessible shell which is owned by the user. How can this be solved ...
4
votes
1answer
2k views

Why the following error occurs in the terminal while using linux commands?

The following error occurs while using the below commands.Guide me to overcome this issue. rpasa-vd1-363: cd /home/rpasa/DDEMO No more processes.
1
vote
1answer
345 views

Difference between behaviors of setrlimit and limit stack

I am seeing a difference of behavior when setting stack size from shell and from inside my c program. The issue is that I have a function which has a large set of local variables (large arrays). If I ...
3
votes
1answer
357 views

Limit number of program executions

Please help me to find out how to limit number of program concurrent executions. I mean, particular program can be ran only, for example 5 times at once. I know how to limit proccess number for user, ...
10
votes
1answer
3k views

What is the sense behind ZFS's limits?

According to Wikipedia, ZFS has the following limits: Max. volume size: 256 trillion yobibytes (2128 bytes) Max. file size: 16 exbibytes (264 bytes) Max. number of files: Per directory: 248 Per file ...
2
votes
1answer
2k views

ulimit vs /etc/security/limits.conf

What is the difference between: a) using the ulimit command to set a limit on a resource? b) editing the /etc/security/limits.conf file for the same purpose? e.g. what is the entry that should be ...
3
votes
0answers
267 views

How to report current usage for a user on ulimits aka pam_limits etc?

Every SA sooner or later runs into a user hitting a ulimit like open files or number of processes. There must be a simple mechanism to track and test against usage of these limits, or ulimits would ...
10
votes
5answers
12k views

Largest allowed maximum number of open files in Linux

Is there a (technical or practical) limit to how large you can configure the maximum number of open files in Linux? Are there some adverse effects if you configure it to a very large number (say 1-...
6
votes
2answers
681 views

Limit size for a particular logfile in Linux

There are a few log files which occupy a huge amount of space and I want to restrict it to 10MB in Linux. For example: test.log file should not exceed 10MB; logs should stop going to that file. Can ...
5
votes
1answer
4k views

Limit CPU usage % all processes and cores

I recently installed Scientific linux 7 (64-bit) on my Dell box which has 2 cores (i.e. 2 logical CPUs). I haven't opened the computer to clean the fan, cooler, etc. for a while and the computer shuts ...
1
vote
1answer
693 views

How to make open files limits more than 2000000?

/etc/security/limits.conf contains * soft nofile 2000000 * hard nofile 2000000 After I changed the open files limits to 2000000, the system can't login; error message is "permission denied". If I ...
4
votes
1answer
361 views

Decline malloc for memory hungry application

Is it possible to deny malloc instead of killing process selected by OOM killer? I think out of memory can be at least logged by the process which is better than being killed. Also, part of the ...
1
vote
1answer
1k views

iptables limit inbound connections to Docker container

Running an Ubuntu 16.04 server with Docker Engine (latest version 1.12.1) and a Docker image/container based on Ubuntu 16.04 as well. I need to limit (on a specific port using TCP) both: the number ...
1
vote
0answers
186 views

is cgroups limits per user or shared across all members?

for example, group memlimit { memory { #approx 200MB memory.limit_in_bytes = 200000000; } } will all members of memlimit share 200 MB, or will each member individually get ...
1
vote
0answers
147 views

How to restrict swap space usage of application

We have a Java application hosted on (jetty server) running on CentOS machine. Every second the application will handle thousands of websocket connections which will get opened and closed again. Also ...
2
votes
2answers
11k views

ulimit command not found (without sudo) and error - coredumpsize: Can't set limit (Operation not permitted)

When i initially login to a server, I see the following error message. ullimit: coredumpsize: Can't set limit (Operation not permitted) Further, when I try to copy files into this machine, I see the ...
3
votes
2answers
2k views

Limiting users ram with cgroups not working (for me)

I registred because I didn't manage running cgroups with several tutorials/comments/whatever you find on google. I want to limit the amount of ram a specifix user may use. Internet says "cgroups". My ...
2
votes
0answers
148 views

How to decrease speed/priority of file transfer (graphical)?

I regularly have big transfers of files running between two local hard drives, and at the same time some network transfers through my Internet browser. The problem is that the local transfer seems to ...
7
votes
3answers
10k views

How can I tell which user limit I am running into?

Multiple sessions of the same user. When one of them gets to the point that it can no longer run new programs, none of them can, not even a new login of that user. Other users can still run new ...
2
votes
1answer
223 views

Is it bad to have thousands of autofs rules?

My company literally has thousands of NFS volumes, which we need to mount on a few of our servers. However, we never mount all of them at the same time; typically we mount about 12 at a time. Most of ...
5
votes
2answers
4k views

How “Max open files” soft and hard limit are set for specific process?

I used the cat /proc/<pid>/limits command to check the Max open file hard and soft limit, but I want to know how this value will be set and can it be increased or decreased? Is this value is ...
1
vote
1answer
106 views

Proftpd classes don't work

If setup my proftpd server and all is working fine on 'full' speed. but I want to limit a certain IP range to a speed limit. So I've added the following lines to the proftpd.conf file: <Class ...
1
vote
3answers
16k views

File Size Limit

What is the maximum file size limit in rhel 32 bit OS, is there any OS limitation for the file size , if there is any limitation set then please tell me what will be for root & oaa.
0
votes
1answer
615 views

`cpulimit` and `nice` not effective in limiting the cpu usage of a python program that contains heavvy computations using theano

I am running a program written in python that makes heavy computations using theano. As it is a very CPU-intensive program, it is disrupting all my other activies on my laptop. For this reason I ...
0
votes
1answer
1k views

How to handle broken link after file deletion.in /proc/<pid>/fd directory?

A process is creating huge number of log files and also deleting it. Many of those deleted files are having broken links in the /proc/pid/fd directory. Do these file handles need to be closed by ...
4
votes
1answer
2k views

Chrome/Chromium crashes (“Aw, snap!”, segfault): “Resource temporarily unavailable”

Chrome/Chromium won't load any websites and just shows the "Aw, Snap! Something went wrong..." page. Some sub-processes segfault. When started in a Terminal, it will show lots of these: [...ERROR:...
1
vote
2answers
923 views

What is the default memory allocation for shell process by linux

What is the default memory allocation for shell process by Linux , i mean is there any upper limit for shell process or any process.
1
vote
0answers
54 views

getpriority returning different value on different hosts with same kernel version

I am running centos 6.6 on same type of hardware with kernel version "2.6.32-504.30.3.el6.x86_64" Has anybody seen this why the below code when compiled and executed gives a different value on two ...
43
votes
3answers
64k views

Creating threads fails with “Resource temporarily unavailable” with 4.3 kernel

I am running a docker server on Arch Linux (kernel 4.3.3-2) with several containers. Since my last reboot, both the docker server and random programs within the containers crash with a message about ...
6
votes
1answer
1k views

Can I set a resource limit for the current process tree?

Let's say I'm running on a resource-constrained system, and I want to ensure that the applications I run open no more than 10 files total. If I try to do it using setrlimit, something like: if (fork(...
2
votes
1answer
2k views

Why lsof reports a higher number of open files of user than what ulimit says should be allowed?

I have checked the result for user kpiserv [kpiserv@***** ~]$ lsof -u kpiserv |wc -l 5358 [kpiserv@***** ~]$ ulimit -a open files (-n) 1024 Why lsof reports a higher ...
6
votes
1answer
2k views

How to limit speed of file copy?

I am copying huge file from NFS mount using dd: dd if=/mnt/nfs/image.img of=/dev/sda I need to limit the speed of reading from NFS. How can I achieve it? The only precondition is to use some easy ...
0
votes
1answer
250 views

Relationship between limits.conf and LDAP?

This seems like a straight forward question: Is there a relationship between the groups defined in ldap ldif files and /etc/security/limits.conf ? I.e., does defining an LDAP user with ou=student ...
1
vote
1answer
181 views

Does loginuid have any impact on process limits?

On CentOS/RHEL 6, when I start my daemon as root user, I see /proc/<pid>/loginuid of the process as 0 and when I start it through sudo, I see loginuid of the sudo user. Even if I do sudo su - ...
1
vote
1answer
110 views

Restricting CPU time of processes by executable path

Is there a way to restrict CPU time (duration) for all processes which are invoked by executables that are located in a certain directory? I would like to be able to auto-kill all applications which ...
7
votes
1answer
7k views

/dev/mmcblk0 partitions limit

I've just mounted a microSD card which has 17 partitions in my laptop and I'm getting the following error in the YaST partitioner: Your disk /dev/mmcblk0 contains 17 partitions. The maximum number of ...
1
vote
0answers
139 views

How can I define time limit to a user's group per session

I have the group ABC and I need to configure a time-limit to 2min per session for its members. Like a TMOUT is only for a user, but I need for a group). How can I define time limit to a user's group ...
0
votes
2answers
323 views

Is there a way to rate-limit an rsync user?

I have a user with a Shell account(with jailkit) that insists on rsyncing 500gb of data on a daily basis. Is there a way to limit that rsync to say just 2mbits per sec? If I have to do it by IP, how ...
1
vote
1answer
823 views

How can I use arptables to limit the number of outgoing ARP requests a second?

End goal: Make a script that will limit the number of outgoing ARP requests in a second using arptables. This is to have the ability to not trip the ARP-limiting feature on Cisco devices. I want to ...