users@glassfish.java.net

Re: Too many open files issue

From: Lachezar Dobrev <l.dobrev_at_gmail.com>
Date: Wed, 17 Oct 2012 19:52:59 +0300

  It is normal for an application server to have a large number of
open files. It is normal for different installations of the same
server to have different number of open files. Remember, that an open
file (or two, or three) is kept for every library file in every
application's WEB-INF/lib directory. Also every connection made to and
from the server is represented by an open file descriptor. That is not
a symptom of a problem.
  It would be symptomatic if the number of open files continuously
rises without a visible reason for that.
  I have one server with ~750 open files, but it has no applications
installed (just the administrative interface). The other server has
more applications and has ~1K open files.

  Use the lsof tool to see what files are open.
  They can be grouped in:
  - JVM open files (/usr/lib/jvm/*, *.so, and some configuration)
  - Glassfish files (~glassfish without the applications)
  - Application files (~glassfish/domains/*/applications/*)
  - TCP listener connections (*:* (LISTEN))
  - TCP connected connections (*:*->*:* (ESTABLISHED))
  - TCP connections for Database Access (similar to above)
  - *other*

  It takes a bit of grep-ing to divide the open files into groups, but
once done one can asses which is the dominating file descriptor sink,
and monitor it for rogues or leakage.

2012/10/17 <forums_at_java.net>:
> I can confirm the behaviour. GF 3.1.1 build 12, RHEL 5.5 64bit & Java
> 1.6.0_21-b06 I have two domains running, neither is clustered. One has ~800
> such files, the other around 1900.
>
> --
>
> [Message sent by forum member 'julesbowden']
>
> View Post: http://forums.java.net/node/891367
>
>