Saturday, July 14, 2012

Too many open files error in linux

If the error is too many open files increase the ulimit in linux for that user whichever user you start the process.

Default open files allowed : 1024

To see current open files execute below command :
lsof | wc -l

Edit in below files and logout and login.
vi /etc/security/limits.d/99-hadoop.nofiles.conf
vi /etc/security/limits.d/hbase.nofiles.conf

To check ulimit
ulimit -Hn (Hard limit)
ulimit -Sn (Soft limit)

Logout and Login
None of the changes you have made above will have any effect until you logout and back in. You do not need to reboot your system or reinstall any software.

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

To see the list of listening port in linux :
lsof | grep LISTEN

To see the list of listening tcp in linux
lsof | grep TCP

No comments :

// Below script tag for SyntaxHighLighter