As stated in another thread we have been seeing the number of open file
handles increase through out the day until Tomcat is restarted.
We are using Rails 2.3.5 with Tomcat 5 OpenJDK 1.6.0-b09 and Jruby 1.4
on RHEL 5.4.
I have finally tracked down the culprit. Using open-uri like so:
open(“http://www.google.com”) {|f|
f.each_line {|line| p line}
}
Causes following to be added to the tomcat lsof entries:
java 20153 tomcat 95r FIFO 0,6 12572360
pipe
java 20153 tomcat 99w FIFO 0,6 12572360
pipe
java 20153 tomcat 100r 0000 0,11 0 12572361
eventpoll
These are not released until Tomcat is restarted. Note that there are
always two “pipes” and 1 eventpoll entry added each time the open
function is executed.
Any ideas on this one? Is this a known issue?