These limits came from a time where multiple “normal” users (not apps) would share the server, and we needed ways to protect them from using too many resources.
They are very low for high performance servers and we generally set them to a very high number. (24k or so) If you need higher numbers, you also need to change the sysctl file-max option (generally limited to 40k on ubuntu and 70k on rhel) .
Setting ulimit:
# ulimit -n 99999
Sysctl max files:
#sysctl -w fs.file-max=100000
Also, and very important, you may need to check if your application has a memory/file descriptor leak. Use lsof to see all it has open to see if they are valid or not. Don’t try to change your system to work around applications bugs.
Related Posts:
- How do I grep recursively?
- Why do you need to put #!/bin/bash at the beginning of a script file?
- How to unmount a busy device
- How to unmount a busy device
- error: ‘Can’t connect to local MySQL server through socket ‘/var/run/mysqld/mysqld.sock’ (2)’ — Missing /var/run/mysqld/mysqld.sock
- “E: Unable to locate package python-pip” on Ubuntu 18.04 [duplicate]
- -bash: syntax error near unexpected token `newline’ for display command
- How do I use grep to search the current directory for all files having the a string “hello” yet display only .h and .cc files?
- SSH using python script
- Changing the resolution of a VNC session in linux
- Building HelloWorld C++ Program in Linux with ncurses
- How does “cat << EOF" work in bash?
- tar removing leading ‘/’ from member names
- X11 forwarding request failed on channel 0
- Directory Inode vs Regular File Inode
- What is difference between arm64 and armhf?
- Opening a .tar.gz file with a single command
- How to make and apply SVN patch?
- How would I get a cron job to run every 30 minutes?
- How to automatically redirect HTTP to HTTPS on Apache servers?
- How to download a file from server using SSH?
- connect to host localhost port 22: Connection refused
- Implementing shell in C and need help handling input/output redirection
- How to count lines in a document?
- What does `set -x` do?
- Can you Run Xcode in Linux?
- How to get the process ID to kill a nohup process?
- Telnet [Unable to connect to remote host: Connection refused]
- Writing a simple shell in C using fork/execvp
- What is the jasperrepots-fonts jar for and how to use it?
- Implementation of multiple pipes in C
- chmod: changing permissions of ‘my_script.sh’: Operation not permitted
- Using ls to list directories and their total sizes
- tar: add all files and directories in current directory INCLUDING .svn and so on
- What does set -e mean in a bash script?
- make -j 8 g++: internal compiler error: Killed (program cc1plus)
- Java command not found on Linux
- How can I use grep to show just filenames on Linux?
- Pipe to/from the clipboard in a Bash script
- what does -zxvf mean in tar -zxvf filename?
- Retrieve last 100 lines logs
- Linux Bash: Move multiple different files into same directory
- Configuring Apache for localhost
- how to search for a directory from the terminal in ubuntu
- Android – Command not found
- How to use dos2unix?
- EC2 ssh Permission denied (publickey,gssapi-keyex,gssapi-with-mic)
- How to add a default include path for GCC in Linux?
- What does ‘bash -c’ do?
- How do I know the script file name in a Bash script?
- WordPress can’t find temporary folder, but folder it’s looking at has correct permissions
- How to configure both webserver and appserver for WordPress CMS?
- How to remove all plugins, posts, pages, and inactive themes in one line with wp-cli? WordPress bloatware removal
- Communcation with wordrpess and linux server [closed]
- How can I sort du -h output by size
- What exactly do the colors in htop status bars mean?
- What permissions should my website files/folders have on a Linux webserver?
- Why is my crontab not working, and how can I troubleshoot it?
- Showing total progress in rsync: is it possible?
- Can I automatically add a new host to known_hosts?
- How to bind MySQL server to more than one IP address?
- Why is “chmod -R 777 /” destructive?
- How can I run Debian stable but install some packages from testing?
- Environment variables of a running process on Unix?
- What’s the best way of handling permissions for Apache 2’s user www-data in /var/www?
- How to check if a library is installed?
- Meaning of the buffers/cache line in the output of free
- Is it normal to get hundreds of break-in attempts per day?
- How to cd into a directory with this name “-2” (starting with the hyphen)?
- how to disable SSH login with password for some users?
- How do I prevent accidental rm -rf /*?
- Is it possible to detach a process from its terminal? (Or, “I should have used screen!”) [duplicate]
- What does Virtual memory size in top mean?
- What’s the best way to check if a volume is mounted in a Bash script?
- How do I find the UUID of a filesystem
- Find out symbolic link target via command line
- Meaning of directories on Unix and Unix like systems
- How to handle security updates within Docker containers?
- How can I port forward with iptables?
- Why do we use a OS Base Image with Docker if containers have no Guest OS?
- Is it possible to make Nginx listen to different ports?
- REJECT vs DROP when using iptables
- Linux command line best practices and tips?
- How to run command as user who has /usr/sbin/nologin as Shell?
- How to make Windows 7 USB flash install media from Linux?
- How to get pid of just started process
- How to install/change locale on Debian?
- What limits the maximum number of connections on a Linux server?
- How to do the port forwarding from one ip to another ip in same network?
- How to disable everything in crontab -l?
- df says disk is full, but it is not
- What is the maximum port number?
- Linux – Is there a way to prevent/protect a file from being deleted even by root?
- How to sort ps output by process start time?
- Is there a proper way to clear logs?
- protocol version mismatch — is your shell clean?
- How do I join two named pipes into single input stream in linux
- How should an IT department choose a standard Linux distribution?
- Command line program to test DHCP service
- Service start request repeated too quickly, refusing to start limit