CDV ❯ increasing fd when running JBoss with Terracotta
-
Bug
-
Status: Closed
-
2 Major
-
Resolution: Fixed
-
-
-
teck
-
Reporter: foshea
-
October 15, 2007
-
0
-
Watchers: 0
-
July 27, 2012
-
October 16, 2007
Description
From the forums http://forums.terracotta.org/forums/posts/list/496.page We’re running JBoss 4.05 with Terracotta 2.4.3 and noticed a strange behaviour. The file descriptors associated with the JBoss process appears to increase continuously as soon as it is started. It increases until it hits the limit and then we start seeing “too many open files” messages in the jboss server log. We don’t see this behaviour when running JBoss without the TC libraries.
We’ve tracked this down and feel pretty sure that it relates to the UrlDeploymentScanner of JBoss (which is used for hot deployment). As I understand it, TC instruments the JBoss UCL and org.jboss.Main class. Could this have inadvertently affected the deployment scanner? If so, is there a solution to it via configuration or code patch (other than turning off the scanner, of course)
Comments
Fiona OShea 2007-10-15
Fiona OShea 2007-10-16
Please merge fix to 2.4 branch
From Tim: 9/28 ‘m still looking into this, but all of those clues are pointing in the right direction. When Terracotta is in the mix, JBoss’ special URL stream handlers for “file://” and “resource://” are not being used. This means the standard sun stream handlers are used which leave open file handles if not explicitly closed (something the jboss code fails to do). The file handle is eventually close by a finalize() method in FileInputStream.
committed a fix/workaround for this in terracotta trunk (revision 5742).