Tuesday, July 14, 2009

Too many open files error while running a process

In one of my last projects we used to get an error telling “Too many open files”

Stack trace

SEVERE: Could not check for resources in: /OracleAS_1/lib/dsv2.jar (from in /OracleAS_1/j2ee/OC4J_SOA/config/server.xml). Caught java.util.zip.ZipException: Too many open files
SEVERE: Could not check for resources in: /OracleAS_1/j2ee/OC4J_SOA/connectors/MQSeriesAdapter/MQSeriesAdapter/MQSeriesAdapter.jar (from in /OracleAS_1/j2ee/OC4J_SOA/connectors/MQSeriesAdapter/MQSeriesAdapter). Caught java.util.zip.ZipException: Too many open files

Reason

The no.of available open files configured at UNIX level is low compare to no.of files required for SOA suite to run.

Type ulimit –a in the server to see the no.of open files limit.

By default it will be 1024

open files (-n) 1024

Solution

Set the nofiles (descriptors) to unlimited (or at least 65536):

$ ulimit -n unlimited

or

$ ulimit -n 65536

Hope this helps. Refer the prereq guide for installation of SOA suite where this parameters have been speciied

No comments: