users@glassfish.java.net

File Descriptor Leak

From: <glassfish_at_javadesktop.org>
Date: Tue, 04 Nov 2008 09:01:45 PST

We have an EJB application running inside a glassfish app server (9.1_02, build b04-fcs) on linux CentOS (5.2). The application consists of a number of stateless session beans and entity beans. Persistence and DB connections are handled via Oracle toplink. The stateless session beans are accessed via remote clients running a swing desktop GUI application (non ACC client).

We have noticed that the glassfish app server process "leaks" file descriptors when the system is being used (i.e., daytime hours). When the app server first starts, it has 250-300 fd's and after about 7 days up time we get up over 1000 fd's. The number of fd's oscillate during light usage times but then climbs dramatically during periods of higher usage.

We've already been down all the usual and obvious trails including looking for unclosed sockets and DB connections in our application. No luck there.

I've attached a dump of the current glassfish file handles in /proc/PID/fd in the attached file (fd.txt). There are a LOT of sockets and fifo's there (over 1400). I've also attached a MS-Excel file which has a plot of the descriptor behavior over a week or so (fdcount.xlsx). Look at "series 3" on the chart. The other two series are other java daemon app's running outside of the glassfish container.

Is there a bug in Glassfish or is there some app server or client config parameter that needs tweaking? Any thoughts would be appreciated.
[Message sent by forum member 'snewbold' (snewbold)]

http://forums.java.net/jive/thread.jspa?messageID=314827