Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

tomcat too many files

Tags:

tomcat

I get the following after a day using tomcat:

java    25006 root  996r  FIFO        0,6            894580 pipe
java    25006 root  997w  FIFO        0,6            894586 pipe
java    25006 root  998r  FIFO        0,6            894587 pipe
java    25006 root 1000r  FIFO        0,6            894588 pipe
java    25006 root 1001w  FIFO        0,6            894599 pipe
java    25006 root 1002r  FIFO        0,6            894600 pipe
java    25006 root 1003r   REG      254,6        0  8570556 /usr/share/apache-tomcat-5.5.30/temp/prn1614392207033974759xc (deleted)
java    25006 root 1004r  FIFO        0,6            894601 pipe
java    25006 root 1005w  FIFO        0,6            894607 pipe
java    25006 root 1006r  FIFO        0,6            894608 pipe
java    25006 root 1007r   REG      254,6        0  8570557 /usr/share/apache-tomcat-5.5.30/temp/prn1736781771548325427xc (deleted)
java    25006 root 1008r  FIFO        0,6            894609 pipe
java    25006 root 1009w  FIFO        0,6            894617 pipe
java    25006 root 1010r  FIFO        0,6            894618 pipe
java    25006 root 1011r   REG      254,6        0  8570558 /usr/share/apache-tomcat-5.5.30/temp/prn8390558105456339721xc (deleted)

The entire application was reviewed for unclosed streams several times.

Using tomcat 5.5.30 and JRE 6u21. Not using AntiJarLocking and AntiResourceLocking (any combination result in the same thing).

Is there a java tool to track down the code that open closeable streams within Java code? What are these pipes? Could it be unclosed connections to the database server (using C3P0)

Arth

like image 236
Arth Avatar asked Aug 13 '10 12:08

Arth


People also ask

What is java net Socketexception Too many open files?

Cause. This issue indicates that the operating system has reached its limit on the number of file descriptors available. This can include open files and socket connections.


1 Answers

The Too many open files message occurs on UNIX® and Linux® operating systems. The default setting for the maximum number of open files might be too low.

To avoid this condition, increase the maximum open files to 8000 by completing these steps:

Edit the /etc/security/limit.conf file.

Change the statement that specifies the value of nofiles to 8000. Optional: If you want the change to take effect in the current session, type

ulimit -n 8000.
like image 190
httpworld Avatar answered Sep 17 '22 02:09

httpworld