Increase file descriptors in CentOS
Leave a reply
To increase the amount of files descriptors in CentOS follow this tutorial. We hope this is useful, for some reason it is difficult to find a complete guide for this on the web. This guide will work in most versions of CentOS and Fedora
In this guide we will be raising the open file descriptor limit from 1024 to 65535.
Edit the following file:
1 |
/etc/sysctl.conf |
You will need to add the following line to the bottom of this file:
1 |
fs.file-max = 512000 |
Save and exit the file.
At the prompt type the following:
1 |
sysctl -p |
This will implement the settings.
Now we will edit the following file:
1 |
/etc/security/limits.conf |
Add the following line to the bottom of the file:
1 |
* - nofile 65535 |
Save and exit.
Type the following command.
Do this as root. This is to be sure that there are no errors:
1 |
ulimit -n 65535 |
Double check by typing ‘ulimit -n’. If the response is ‘65535’ everything is good and you are all set.