Tuesday, January 29, 2013

Duplicity fails on Too many open files

If you have got any error message like “Too many open files” in Ubuntu machine below are the steps to overcome the error message.
I have faced this error message while restoring Duplicity backup volumes. To restore backup volume I have used Java code.

There is simple solution that I can maximize the Open file Descriptor in Ubuntu OS, to complete that follow the below instructions.

System-wide File Descriptors (FD) Limits

The number of concurrently open file descriptors throughout the system can be changed via /etc/sysctl.conf file under Linux operating systems.

The Number Of Maximum Files Was Reached, How Do I Fix This Problem?

Many application such as Oracle database or Apache web server needs this range quite higher. So you can increase the maximum number of open files by setting a new value in kernel variable /proc/sys/fs/file-max as follows (login as the root):# sysctl -w fs.file-max=100000
Above command forces the limit to 100000 files immediately. You need to edit /etc/sysctl.conf file and put following line so that after reboot the setting will remain as it is:
# vi /etc/sysctl.conf
Append a config directive as follows:
fs.file-max = 100000
Save and close the file. Users need to log out and log back in again to changes take effect or just type the following command:
# sysctl -p
Verify your settings with command:
# cat /proc/sys/fs/file-max
OR
# sysctl fs.file-max



Source : http://www.cyberciti.biz/faq/linux-increase-the-maximum-number-of-open-files/

1 comment: