Wednesday, June 15, 2011

Solution for too many open files of Tomcat in Ubuntu

Open: sudo gedit /etc/sysctl.conf
add/edit system-level variable: fs.file-max=200000

Open: sudo gedit /etc/security/limits.conf
add/edit shell-level variable:
* soft nofile 2048
* hard nofile 2048

Restart OS.
Check values by command:

cat /proc/sys/fs/file-max
and
ulimit -n

No comments:

Post a Comment