Out of Memory: Java heap space (solved)
We want to share this problem and solution with the community, in case anyone else runs into a similar problem.
Our server (in production, and under load) would run out of heap memory with an error:
Exception in thread "http-bio-8088-exec-23" java.lang.OutOfMemoryError: Java heap space
at org.apache.tomcat.util.buf.ByteChunk.allocate(ByteChunk.java:163)
at org.apache.tomcat.util.buf.ByteChunk.<init>(ByteChunk.java:128)
at org.apache.catalina.connector.OutputBuffer.<init>(OutputBuffer.java:157)
at org.apache.catalina.connector.OutputBuffer.<init>(OutputBuffer.java:145)
at org.apache.catalina.connector.Response.setConnector(Response.java:148)
at org.apache.catalina.connector.Connector.createResponse(Connector.java:844)
Since we have upgraded to Oracle JDK 1.6.0_45, the problem has not occurred again within a period of a month.
Previously, we experienced the problem every 3 to 7 days.
We have marked the problem as solved. The heap usage on the iDempiere Server Monitor seems to be much improved.
We continue to monitor memory usage on the server.
The JDK previously in use was:
OpenJDK, java version "1.6.0_30"
OpenJDK Runtime Environment (IcedTea6 1.13.1) (6b30-1.13.1-1ubuntu2~0.12.04.1)
OpenJDK 64-Bit Server VM (build 23.25-b01, mixed mode)
The problem may have also been solved by using the latest OpenJDK, but this was not tested.
-----
Neil Gordon
nTier Software Services