Please see my other blog for Oracle EBusiness Suite Posts - EBMentors

Search This Blog

Note: All the posts are based on practical approach avoiding lengthy theory. All have been tested on some development servers. Please don’t test any post on production servers until you are sure.

Monday, June 20, 2011

500 Internal Server Error

Client was getting following error while accessing the form application.

500 Internal Server Error
java.io.IOException: Too many open files at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.(FileInputStream.java:106) at java.io.FileInputStream.(FileInputStream.java:66) at java.io.FileReader.(FileReader.java:41) at oracle.forms.servlet.ConfigFileParser.(Unknown Source) at oracle.forms.servlet.FormsServlet.doRequest(Unknown Source) at

oracle.forms.servlet.FormsServlet.doGet(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:835) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:341) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:816) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:231) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].server.http.AJPRequestHandler.run(AJPRequestHandler.java:136) at com.evermind[Oracle Application Server Containers for J2EE 10g (10.1.2.3.0)].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192) at java.lang.Thread.run(Thread.java:534)

 Cause
On Windows systems , there is a limit to the number of files that can be simultaneously opened : about 2000.
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.


Ref: 268107.1

No comments: