Support Forum

Next Page

Page: 1 2

Previous Page

Thread: Java heap space

Created on: 09/01/09 10:35 AM

Replies: 20

dial



dial's Gravatar

Joined: 11/27/08

Posts: 26

Java heap space
09/01/09 10:35 AM

Hello

we have a problem with our CF-Server 8 (Java 6.0.10.6), Win2003 Server, MS-SQL 2005
There are 12 mura installation running on this machine. We do an update to all mura's to r649. After these updates java run out of heap space. first time after 12 hours, then again after 14 hours.

"Error","jrpp-377","09/01/09","07:50:48","Dweb133753htdocsconfig","Java heap space The specific sequence of files included or processed is: D:\web\133753\htdocs\index.cfm'' "
java.lang.OutOfMemoryError: Java heap space

Did anyone had the same problem or any idea what this may be?

An other post in this forum Out of Memory... pointed out a mySql configuration problem, but our Server runs with MS-SQL.

thanx
* Last updated by: dial on 9/1/2009 @ 10:35 AM *

Link | Top | Bottom

MalcolmOKeeffe





Joined: 06/03/08

Posts: 132

RE: Java heap space
09/01/09 1:31 PM

@Dial - can you give us a bit more info:

How much RAM is on the server, and how much memory have you allocated to CF?
Are you running low on disk space?
Do you have Mura CMS caching turned on or off in your site settings?
Are you using CF Standard or Enterprise? If you're using Enterprise, do you have Memory Tracking enabled? (if so, turn it off)

We recommend that you don't use the ColdFusion monitoring, and instead use Fusion Reactor (lighter footprint and more features) and watch the system so you can pinpoint where the memory hit is occurring.

Let us know about these questions, and we'll see what next steps might be

Thanks,

-------------------------
Malcolm O'Keeffe
Team Mura
Blue River Interactive Group

Link | Top | Bottom

dial



dial's Gravatar

Joined: 11/27/08

Posts: 26

RE: Java heap space
09/02/09 2:29 AM

Hi Malcolm

There is 4GB RAM and Minimum/Maximum JVM Heap Size (MB) 512/1280, disk space >20GB, CF Standard, Java Version 1.6.0_01, Java VM Version 1.6.0_01-b06, CF Version 8,0,0,176276

We will try the Fusion Reactor to get more system info.
Thanks for the hint

Link | Top | Bottom

dial



dial's Gravatar

Joined: 11/27/08

Posts: 26

RE: Java heap space
09/02/09 10:09 AM
Attachment: Click5_Memory_Graph.jpg

Hi again
we installed the monitor tool in the morning.
now after 5 hours the memory run to the maximum limit (80%). see attached graph.
The average requests per second is 2-3. the average request time is 495ms. Some sites had a request time over 60s.

we keep trying to find any information about this problem!

Link | Top | Bottom

tonyg



tonyg's Gravatar

Joined: 05/09/08

Posts: 131

RE: Java heap space
09/02/09 10:16 AM

Just throwing this out there:
You say you're running Java 6.0.10.6.
Java versions prior to 6.0.11 had the infamous "class loader bug" which caused super slow load times for CFC-heavy ColdFusion apps. I'm not sure if this would affect your heap space, but maybe try to upgrade to the latest Java version?

________________
objectivebias.com

Link | Top | Bottom

dial



dial's Gravatar

Joined: 11/27/08

Posts: 26

RE: Java heap space
09/02/09 10:21 AM

thanks tonyg
I will double check the java version.

Link | Top | Bottom

dial



dial's Gravatar

Joined: 11/27/08

Posts: 26

RE: Java heap space
09/04/09 5:21 AM

update...
we checked the versions and updated to CF 8.0.1 the java version was still 1.6.0_04. So we get the latest java from sun (1.6 update 16) and try to change the java.home to this version. Unfortunatly CF Application server won't start. so we copy the bin and lib folder from the new Version to the CF8/runtime/jre folder. Now we have java Version 1.6.0_16.
The performance is now better, an the memory useage don't rise so fast, but it still rise to the maximum heap space. Now we try several JVM params to find out which one will protect the JVM to run out of memory.

We try this on our test server and I hope we find this out.
Is there anybody who has more than one mura installed on a server under CF8?

Link | Top | Bottom

suspiria



suspiria's Gravatar

Joined: 05/26/09

Posts: 8

RE: Java heap space
09/10/09 10:16 PM

You need to download the JDK not the JRE from java.sun.com. I imagine that is what you're doing wrong. Once you've installed the JDK you can then copy the jre folder within it, NOT the seperate JRE6 folder under Program Files\Java.

In my case, I shutdown CF, renamed C:\ColdFusion\runtime\jre (stand-alone) OR C:\Jrun4\jre (multi-server) to "jre_OLD", and then copied "C:\Program Files\Java\jdk1.6.0_16\jre" over. You should be able to start CF up now. If not, remove the newly copied jre folder and rename the old one back to "jre".

Many people make the mistake of attempting a CF JVM upgrade via the JRE download but that doesn't include a critical server component that comes packages with the JDK's own JRE. A bit confusing so feel free to ask away if you hit a brick wall.

You'll notice dramatic improvements in performance and garbage collection once the JVM is upgraded.
* Last updated by: suspiria on 9/10/2009 @ 10:18 PM *

Link | Top | Bottom

dial



dial's Gravatar

Joined: 11/27/08

Posts: 26

RE: Java heap space
09/11/09 11:32 AM

@suspiria
Thank YOU VERY MUTCH! Thats the point why Coldfusion didn't start with another java.home folder. We now realy have the latest version running and yes the performance is mutch mutch better then before, BUT there is still a memory problem after a while.

Here the steps we have done:
- downloaded the latest JDK from SUN
- Install it on a windows machine under c:\sun\SDK
- copied the folder /sun/SDK/jdk/jre to the server
- modified jvm.config: changed the java.home to this folder
- Restart the "ColdFusion 8 Application Server"
- enjoyed the performance improvement

after 6 hours the free memory runs lower 3% and the full GC repeats very often and don't bring it back :-(

these are the java.args we try so far:

java.args=-server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -verbose:gc -Xloggc:gc_08.log -Xms768m -Xmx1280m -Dsun.io.useCanonCaches=false -Dsun.rmi.dgc.server.gcInterval=600000 -XX:MaxPermSize=256m -XX:NewSize=192m -XX:SurvivorRatio=4 -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application.home}/../wwwroot/WEB-INF/cfform/jars,C:/ColdFusion8/cfx/adsjdbc.jar

java.args=-server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -verbose:gc -Xloggc:gc_09.log -Xms768m -Xmx1280m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:NewSize=192m -XX:SurvivorRatio=8 -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application.home}/../wwwroot/WEB-INF/cfform/jars,C:/ColdFusion8/cfx/adsjdbc.jar

java.args=-server -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintHeapAtGC -verbose:gc -Xloggc:gc_10.log -Xms768m -Xmx1280m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:NewSize=192m -XX:SurvivorRatio=8 -XX:NewRatio=4 -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.classPath={application.home}/../lib/updates,{application.home}/../lib,{application.home}/../gateway/lib/,{application.home}/../wwwroot/WEB-INF/flex/jars,{application.home}/../wwwroot/WEB-INF/cfform/jars,C:/ColdFusion8/cfx/adsjdbc.jar

I keep trying ....

Link | Top | Bottom

christianready





Joined: 06/13/09

Posts: 26

RE: Java heap space
02/20/10 2:59 PM

I'm having problems as well. Here is what I am using:

MacOSX 10.6.2
Railo 3.1
Tomcat 6.20
Mura 5.2
MySQL

All of a sudden, my local dev site stopped working. I get a series of numbers followed by a message like this:

Railo 3.1.2.001 Error (Java.lang.outofmemoryerror)
Message Java heap space
Stacktrace The Error Occurred in
/Users/christianready/Sites/jerismithready/mura/www/WEB-INF/lib/railo-server/context/library/tag/Dump.cfc: line 70

68: <cfset var meta=dumpStruct(StructKeyExists(attributes,'var')?attributes.var:nullValue(),attributes.top,attributes.show,attributes.hide,attributes.keys,attributes.metaInfo,attributes.showUDFs,attributes.label)>
69: <cfcatch>
70: <cfset var meta=dumpStruct(StructKeyExists(attributes,'var')?attributes.var:nullValue(),attributes.top,attributes.show,attributes.hide,attributes.keys,attributes.metaInfo,attributes.showUDFs)>
71: </cfcatch>
72: </cftry>

called from/Users/christianready/Sites/jerismithready/mura/www/Application.cfc: line 138

Even if I try restarting everything, I still get this error and I'm not clear on how to correct it. Has anyone seen this before?

Link | Top | Bottom

matt





Joined: 04/26/08

Posts: 2639

RE: Java heap space
02/20/10 3:12 PM

Is that the entire error? Could you go into your www/Application.cfc and comment out the onError method at the bottom of the file see post that error as well.

=================================
Matt Levine
Team Mura
Blue River Interactive Group

Link | Top | Bottom

matt





Joined: 04/26/08

Posts: 2639

RE: Java heap space
02/20/10 3:15 PM

Also how much memory do you have allocated to your tomcat instance?

=================================
Matt Levine
Team Mura
Blue River Interactive Group

Link | Top | Bottom

christianready





Joined: 06/13/09

Posts: 26

RE: Java heap space
02/20/10 3:28 PM

Hi Matt,

I commented out the onError() in Application.cfc and this time I get a blank screen with no error message. Here is what I get in my Tomcat console:

Feb 20, 2010 3:27:08 PM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet CFMLServlet threw exception
java.lang.OutOfMemoryError: Java heap space
Feb 20, 2010 3:27:10 PM org.apache.catalina.connector.CoyoteAdapter service
SEVERE: An exception or error occurred in the container during the request processing
java.lang.OutOfMemoryError: Java heap space
Feb 20, 2010 3:27:11 PM org.apache.coyote.http11.Http11Processor process
SEVERE: Error finishing response
java.lang.OutOfMemoryError: Java heap space

As to memory, I'm afraid I'm not sure how to see how much I have allocated. Do you know how I can check this?

Many thanks!

Link | Top | Bottom

matt





Joined: 04/26/08

Posts: 2639

RE: Java heap space
02/20/10 4:10 PM

Look for "CATALINA_OPTS" in /Library/Tomcat/bin/catalina.sh and see what your Xmx value is.

=================================
Matt Levine
Team Mura
Blue River Interactive Group

Link | Top | Bottom

christianready





Joined: 06/13/09

Posts: 26

RE: Java heap space
02/20/10 4:31 PM
Attachment: catalina.sh.txt

Hi Matt, I tried looking there but I don't have a Tomcat folder under Library. I did find it under /Applications/Tomcat/bin/catalina.sh but I couldn't see anything labeled Xmx. I have attached my file here in case it's there but I'm not seeing it.

Link | Top | Bottom

matt





Joined: 04/26/08

Posts: 2639

RE: Java heap space
02/20/10 5:10 PM

Underneath the line

PRG="$0"

Add

export CATALINA_OPTS="-Xms512m -Xmx512m"

So it looks like:

PRG="$0"

export CATALINA_OPTS="-Xms512m -Xmx512m"

I think the default is only 64m.

=================================
Matt Levine
Team Mura
Blue River Interactive Group

Link | Top | Bottom

christianready





Joined: 06/13/09

Posts: 26

RE: Java heap space
02/20/10 5:31 PM

Well this is interesting. I am starting Tomcat from within Eclipse. When I do, it now generates the following error:

Server ReadyNet was unable to start within 45 seconds. If the server requires more time, try increasing the timeout in the server editor.

Link | Top | Bottom

christianready





Joined: 06/13/09

Posts: 26

RE: Java heap space
02/20/10 5:35 PM

Disregard my last. I got it to start up. Oddly enough, I still get a blank page when I try to bring up the site or even the railo admin.

Link | Top | Bottom

christianready





Joined: 06/13/09

Posts: 26

RE: Java heap space
02/20/10 6:27 PM

Ok, I increased my timeout on server start and I can see in my Tomcast console log in Eclipse that I'm still getting a "java.lang.OutOfMemoryError: Java heap space" which has me thinking this is an issue with Tomcat/Railo and not Mura.

Link | Top | Bottom

matt





Joined: 04/26/08

Posts: 2639

RE: Java heap space
02/20/10 7:44 PM

I would try the Railo google group. There are a lot over nice and smart people over there.

http://groups.google.com/group/railo

=================================
Matt Levine
Team Mura
Blue River Interactive Group

Link | Top | Bottom

Next Page

Page: 1 2

Previous Page

New Post

Please login to post a response.