Skip to main content

Deploying applications from DAS results in too many open files

No replies
kerigan
Offline
Joined: 2011-11-21
Points: 0

Hi,

We are currently facing an issue on our administration glassfish server.

Configuration:

Glassfish version: 3.1.2.2 (autodeploy-enabled and dynamic-reload-enabled set on false for each cluster configuration)
ulimit -n: 2048
OS: Centos 5

The problem:

Currently our DAS manages 8 deployed webapps under the same domain.
Each webapp is deployed into a remote cluster, the DAS itself is installed on a dedicated machine.
Logs from DAS's server.log now raise "Too many open files" errors.

The command lsof -p 'DAS pid' shows that all libs (for each webapps) packaged in war files are loaded by the DAS, eg:

/path/to/glassfish/domains/mydomain/applications/webApp1/WEB-INF/lib/lib-a1.jar
/path/to/glassfish/domains/mydomain/applications/webApp1/WEB-INF/lib/lib-a2.jar
...
/path/to/glassfish/domains/mydomain/applications/webApp2/WEB-INF/lib/lib-b1.jar
/path/to/glassfish/domains/mydomain/applications/webApp2/WEB-INF/lib/lib-b2.jar
...

- In order to get rid of this "Too many open files" issue, one solution could be to increase the ulimit value to something like 8192 but the issue will inexorably occur again when the number of deployed webapps grow up (as the number of jar files open by the DAS would expand).

- Another solution could be to move embedded libs from war files into a common directory classpath like /path/to/glassfish/domains/mydomain/lib/classes but unfortunately embedded libs from war files are not the same and/or versions may differ.

- A third (but not elegant as it reduces interest upon centralized administration) solution would be to create a new domain each time "Too many open files" error happens in order to deploy newly webapps into the new domain.

Are there other solutions to manage this issue ?
Is there a way that the DAS does not load embbeded .jar files from webapps on startup ?

Your advices and comments about this issue would be greatly appreciated.

Regards,
Keri