top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Too many files open by tomcat 8.0.23 on ubuntu 14.04

+2 votes
678 views
in mycase of tomcat error on ubuntu 14.04 too many files open, 
even though limit is 8096, proc limit says 4096. why ? any body?          
ranjan@ubuntu:~$ cat /proc/22897/limits          
Limit                     Soft Limit           Hard Limit           Units     
Max cpu time              unlimited            unlimited            seconds     
Max file size             unlimited            unlimited            bytes     
Max data size             unlimited            unlimited            bytes     
Max stack size            8388608              unlimited            bytes     
Max core file size        0                    unlimited            bytes     
Max resident set          unlimited            unlimited            bytes     
Max processes             56045                56045                processes     
Max open files            4096                 4096                 files     
Max locked memory         65536                65536                bytes     
Max address space         unlimited            unlimited            bytes     
Max file locks            unlimited            unlimited            locks     
Max pending signals       56045                56045                signals     
Max msgqueue size         819200               819200               bytes     
Max nice priority         0                    0     
Max realtime priority     0                    0    
Max realtime timeout      unlimited            unlimited            us     
ranjan@ubuntu:~$ sysctl -a |grep file     
sysctl: permission denied on key 'fs.protected_hardlinks'     
sysctl: permission denied on key 'fs.protected_symlinks'     
fs.file-max = 1426057     fs.file-nr = 8096       0       1426057     
sysctl: permission denied on key 'kernel.cad_pid'     
fs.xfs.filestream_centisecs = 3000     
posted Jul 9, 2015 by Priya Ranjan Kumar

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button
edit the file /etc/init.d/tomcat and add:
ulimit -Hn 16384
ulimit -Sn 16384

Check if it resolves (you may need to restart)

1 Answer

0 votes

As salil pointed out

edit the file /etc/init.d/tomcat and add:
ulimit -Hn 16384
ulimit -Sn 16384

followed by restart the tomcat should increase the limit, this was a bug in ubuntu and has not been resolved yet.

answer Jul 10, 2015 by Kuldeep Apte
Similar Questions
+1 vote

I use Unity and have a bluetooth button in my status bar. When I switch off bluetooth with this
button, my hardware LED still tells bluetooth is on!

Do you have any idea how I can get this bluetooth software switch working?

0 votes

I am running Ubuntu 12.04.2 and run the updates manually on a regular basis from the command line. I noticed that the Kernel gets updated too often...
I know I am supposed to reboot the machine after a Kernel update, but that means rebooting every two days. One of the things I like to do is run the uptime command and smile :-)
1. Why does the Kernel get updated so often?
2. How do I find the change log, so I can decide if I need to update / restart the machine?

0 votes

We have tried to do build with the normal user, but it failed after some time without giving any permission issue. I have made compilation directory permission as 777 and the same code has been compiled successfully with sudo or root user.

...