28 votes

How to increase max open files limit on Ubuntu 18.04?

From the manual: -n The maximum number of open file descriptors (most systems do not allow this value to be set) systemd has an option for this: $ more /etc/systemd/system.conf | grep ...
Rinzwind's user avatar
  • 300k
18 votes

Too many open files

When the "Too Many Open Files" error message is written to the logs, it indicates that all available file handles for the process have been used (this includes sockets as well). In a ...
Sachin Yadav's user avatar
15 votes

How to increase max open files limit on Ubuntu 18.04?

Ubuntu 18.04 Step by Step Hope all this helps, quite long but it works (with proof) I came across this thread whilst installing MongoDb on Ubuntu 18.04 https://posidev.com/blog/2009/06/04/set-...
englishPete's user avatar
12 votes

How to increase max open files limit on Ubuntu 18.04?

I had the same problem on Ubuntu 20.04. The only file that needed to be changed was /etc/security/limits.conf. Appending the line * - nofile 100000 to that file and re-login in did the trick: $ ulimit ...
Apteryx's user avatar
  • 458
12 votes

bash fork: retry: Resource temporarily unavailable

For the case in the comments, where you were not using much memory per thread, you were hitting the cgroup limits. You will find the default to be around 12288, but the value is writable: $ cat /sys/...
Doug Smythies's user avatar
11 votes

set ulimit for non root user

From here I see that three files have to be changed: /etc/systemd/user.conf /etc/systemd/system.conf, and /etc/security/limits.conf In the first two add the following line in addition to the ...
George Udosen's user avatar
10 votes

How do I increase the open files limit for a non-root user?

ulimit -S -n 4096 That should increase your soft limit for open files (-n) to 4096.
ekeyser's user avatar
  • 239
9 votes

Is the kilobyte used by time and ulimit commands either 1000 (SI) or 1024 (old school) bytes?

Per man dir.1: The SIZE argument is an integer and optional unit (example: 10K is 10*1024). Units are K,M,G,T,P,E,Z,Y (powers of 1024) or KB,MB,... (powers of 1000). Per info ls: ‘-h’ ‘--human-...
CG3's user avatar
  • 306
7 votes
Accepted

Is the kilobyte used by time and ulimit commands either 1000 (SI) or 1024 (old school) bytes?

No, kilobytes is 1000. We follow the International System of Units so the prefix "kilo" refers to 1000 not 1024. Any other reference is wrong. 1024 is Kibibytes (kilo binary) From ulimit -a:...
Rinzwind's user avatar
  • 300k
7 votes

Ardour, system has a limit for maximum amount of locked memory

Launch a terminal (CTRL-ALT-T) and open the file in gedit with admin priveldges: sudo gedit /etc/security/limits.conf Be sure that the file contains the following line: @audio - memlock unlimited ...
apostl3pol's user avatar
7 votes
Accepted

Unable to modify ulimit

You have to lower the soft limit before you can lower the hard limit. You can see the differences between them using the relevant flags. For example: $ ulimit -Su 900 $ ulimit -Hu 900 Here, my ...
Ken Sharp's user avatar
  • 991
6 votes

how to increase maximum open files for memcached service

In the memcache config set the max open connections using: -c 10240 You can check if this is actually necessary or not by checking on listen_disabled_num when running: echo stats | nc localhost ...
John Foley's user avatar
6 votes
Accepted

Open files limit not reflecting config changes

After a long time, I found out you need to add DefaultLimitNOFILE=65535 to /etc/systemd/system.conf and /etc/systemd/user.conf as well.
Cedric Reichenbach's user avatar
5 votes

I cannot set ulimit on subshell

There are two obvious issues with your code: First, you need to use single quotes around the string after echo to prevent the shell from interpreting the ! in the shebang #!/bin/bash as the history ...
Raffa's user avatar
  • 32.3k
4 votes
Accepted

What is "the core file"?

A core file is described in the core(5) manual page: $ man 5 core NAME core - core dump file DESCRIPTION The default action of certain signals is to cause a process to termi‐ ...
steeldriver's user avatar
4 votes

ulimit -n command shows no change inspite of modifying the /etc/security/limits.conf file

/etc/security/limits.conf is a PAM construct. Normally PAM would process this during your user login in a "normal" Linux, but ... you don't really "log in" in WSL, so PAM doesn't ...
NotTheDr01ds's user avatar
3 votes

Is the kilobyte used by time and ulimit commands either 1000 (SI) or 1024 (old school) bytes?

A kilobyte is 1000 bytes (SI prefix meaning thousand). A kibibyte is 1024 bytes (IEC prefix meaning kilo binary). This convention has been used since 1998, but I guess the usage of these prefixes are ...
Artur Meinild's user avatar
3 votes
Accepted

Ubuntu 15.10 core files not found although core_pattern looks ok

the solution was to set ulimit -c unlimited Here is my full solution that puts all the core files in /tmp/cores with an explicit name for those files: sudo apt-get remove apport ulimit -u ...
philipper's user avatar
  • 203
3 votes

ulimit: Unknown option “-r”

The problem turned out to be the fact that I was using fish shell. The ulimit command there is obviously a different thing that the one in bash. In bash, it works as expected.
zegkljan's user avatar
  • 428
3 votes
Accepted

On Ubuntu 22.04, editing limits.conf to increase number of file descriptors doesn't work

The easiest way to change this is to put ulimit -S -n 65536 in your shell init file (.bashrc possibly).
user10489's user avatar
  • 4,069
2 votes

Cannot increase open file limit beyond 999999 on 14.04+

I know it's 10 months late, but you've set the hard limit twice for all users. Change the second line to be a soft ulimit. * hard nofile 999999 * soft nofile 999999 root hard nofile 999999 root soft ...
Hamish's user avatar
  • 21
2 votes

limits.conf file Changing Max Memory Option

I'm going to assume that you're talking about bash's ulimit. From the manual: -m The maximum resident set size (many systems do not honor this limit). Of the entries in your question, rss is ...
muru's user avatar
  • 198k
2 votes

Check the max allowed threads count for sure

There is no threads per process limit! But there is a limit on the total number of processes on the system (threads are essentially just processes with a shared address space on Linux) cat /proc/...
Robert Riedl's user avatar
  • 4,351
2 votes
Accepted

The size of the file set as a limit in limits.conf

The ulimit value appears to be in kibibytes (2001 x 1024 = 2049024 bytes) whereas bs=1KB is kilobytes (2049 x 1000 = 2049000 bytes). The dd suffix for kibibytes is just K (or k) not KB. So :~$ ulimit -...
steeldriver's user avatar
2 votes

Ubuntu 18.04: Maximum number of clients reached - related to dbus-daemon

It is not related to the version of your software I think because I am having the same problem on Lubuntu 20.04. I think I found a direction to 'solve' the issue 'Maximum number of clients reached' on ...
user1292418's user avatar
2 votes

Too many open files

Run less /proc/PID/limits to check the actual Soft Limit of Max open files. If you set up ulimits but the actual number is still low - review how you launch the process. E.g., systemd takes over the ...
SVUser's user avatar
  • 121
2 votes

New Ubuntu user, having trouble increasing the “open file limit”

You can pipe echo to sudo tee -a to get the same result. echo 'fs.file-max=1000000' | sudo tee -a /etc/sysctl.conf echo '* soft nofile 1000000' | sudo tee -a /etc/security/limits.conf echo '* hard ...
mchid's user avatar
  • 43.6k
1 vote

Can't change file descriptor max limit in Ubuntu 20.04 (LTS) x64

The max file descriptor limit and the ulimit are separate numbers. The ulimit by default is set to 1024 and should probably not be changed in most circumstances because some older libraries have ...
user10489's user avatar
  • 4,069
1 vote

New Ubuntu user, having trouble increasing the “open file limit”

All of these can be done as "root". So sudo -i {password} echo "fs.file-max=1000000" >> /etc/sysctl.conf echo "* soft nofile 1000000" >> /etc/security/limits.conf echo "* hard nofile ...
Rinzwind's user avatar
  • 300k
1 vote

sysctl: /etc/security/limits.conf(55): invalid syntax, continuing

*limits.conf * is parsed by the PAM *pam_limits * module at session startup - it doesn't use sysctl.conf syntax.
Djn's user avatar
  • 11

Only top scored, non community-wiki answers of a minimum length are eligible