Tuesday, November 20, 2012

500 Internal Server Error .Too many open files....


500 Internal Server Error . Client was getting following error while accessing the form application.
 The OC4J log file shows
formsweb: Servlet error
 Or web: Servlet error
java.io.IOException: Too many open files

Cause
On Windows systems , there is a limit to the number of files that can be simultaneously opened : about 2000.

On unix it is 1024.the problem could cause due to antivirus software running in the server or for any other updates running as well.
This limit applies to all the servlets running in the OC4J_BI_Forms : The forms Servlets and the Reports Servlets. 
Solution
To increase the parameter numprocs for the OC4J_BI_Forms : 

1. Edit the file ORACLE_HOME\opmn\conf\opmn.xml 

2. Locate the following lines :
....
process-type id="OC4J_BI_Forms" module-id="OC4J">
....
process-set id="default_island" numprocs="1"/>
/process-type>
.....



3. Replace :
numprocs="1"
by
numprocs="2"

4. Execute the command : 
$ORACLE_HOME/bin/opmnctl reload 
in order to reload the file opmn.xml

The modification will be taken into account the next time the OC4J_BI_Forms will be restarted.

When numprocs > 1 , several processes will be started for the OC4J OC4J_BI_Forms. It means that the requests will be "load-balanced" between the 2 processes.
So, the number of files opened will be divided by 2 (if numprocs=2) and the limit will no more be reached.

No comments:

Post a Comment