Tuesday, August 18, 2009

Oracle Forms -REP-56055 exceeded max connections allowed Oracle Reports Error

If you encounter the error, REP-56055 exceeded max connections allowed Oracle Reports Error then you need to increased the number of database connection in the reports configuration file.



1. Goto $ORACLE_HOME/reports/conf/ , find your server report name e.g. TestReport.conf

2. find the connection maxConnect= and set it to a higher values.

3. Restart the reports services .



There is also a possibilities that after you increase to high value on the maximum database connection , the error still persists.



If so, then if your reports takes a long time to generated out and has many pages the possibilities are that the number of session in 1 reports engine more than the reports engine can handled.



Then you need to changed the engineid , engine id="rwEng" engLife="50" to lesser values such as 5 and increase your maxEngine from 1 to higher value like 5.

Monday, August 17, 2009

Oracle Application Server - Java OutOfMemory , Analyzing the javacore dump



  1. Download the IBM Thread & Monitor Dump Analyzer for Java at http://www.alphaworks.ibm.com/tech/jca


  2. Follow the guide in How to Diagnose Java Resource Starvation http://java.sys-con.com/node/921279?page=0,1


  3. Use the JDK 1.5 to run the jca.jar and open the javacore*.txt file with all the same thread file name. e.g. javacore147902.xxxxx.txt


  4. In the Compare Monitors of the tool, you will noticed the blocked by 1. Clicked the blocked for more information. In the state, “Monitor”, the action is “Owns Monitor Lock on Heap Lock” , that means it is currently owning the lock when the dump is initiated.


  5. Notice the last thread information on the detail. If the information is something like below, then it is possible that your application is logging to many data in the logs file and caused the locking issue.




  6. at
    java.util.AbstractCollection.toString(AbstractCollection.java(Compiled Code))at
    java.lang.String.valueOf(String.java(Compiled Code))at
    java.lang.StringBuffer.append(StringBuffer.java(Compiled Code))at
    org.apache.commons.lang.builder.ToStringStyle.appendDetail(ToStringStyle.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ToStringStyle.appendInternal(ToStringStyle.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ToStringStyle.append(ToStringStyle.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ToStringBuilder.append(ToStringBuilder.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ReflectionToStringBuilder.appendFieldsIn(ReflectionToStringBuilder.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ReflectionToStringBuilder.toString(ReflectionToStringBuilder.java(Compiled
    Code))at
    org.apache.commons.lang.builder.ToStringBuilder.reflectionToString(ToStringBuilder.java(Compiled
    Code))



  7. In our case, the logging is set by the Log4j , which we found out that the settings is set to full debug mode, we changed it to WARN mode. "log4j.rootLogger=DEBUG, app" to "log4j.rootLogger=WARN, app" , more information at here http://www.laliluna.de/log4j-tutorial.html


  8. After this, our application server java core dump is greatly reduce.