We had out-of-memory problems with CFMX 6.1 udpater, and using metrics 
determined it wasn't growing the heap as it was supposed to. (We've stuck with 
the same settings on CFMX 7).  

I'd try starting the heap at the same size as the maximum, and also experiment 
with starting the Permanent Generation at 256, ... and get those metrics going. 


Here's a simple thing you can use in the interim:

<cfset runtime = CreateObject("java","java.lang.Runtime").getRuntime()>

<!--- change amount from bytes to MB --->
<cfset freeMemory = runtime.freeMemory() / 1024 / 1024>
<cfset totalMemory = runtime.totalMemory() / 1024 / 1024>
<cfset maxMemory = runtime.maxMemory() / 1024 / 1024> 


<cfoutput>
    Free Allocated Memory: #Round(freeMemory)# MB<br>
    Total Memory Allocated: #Round(totalMemory)# MB<br>
    Max Memory Available to JVM: #Round(maxMemory)# MB<br>
</cfoutput>

<br>

<!--- From these numbers we can also determine the percent of free allocated 
memory available, and also the percent of avalaible memory allocated --->

<cfset percentFreeAllocated = Round((freeMemory / totalMemory) * 100)>
<cfset percentAllocated = Round((totalMemory / maxMemory ) * 100)>
<cfoutput>
    % of Free Allocated Memory: #percentFreeAllocated#%<br>
    % of Available Memory Allocated: #percentAllocated#%<br>
</cfoutput>



---------- Original Message ----------------------------------
From: "Russ" <[EMAIL PROTECTED]>
Reply-To: [email protected]
Date:  Tue, 11 Apr 2006 12:16:02 -0400

>I have already played with those settings, but it still crashed yesterday.
>Here are the settings I'm using:
>
>java.args=-server -DJINTEGRA_NATIVE_MODE -DJINTEGRA_PREFETCH_ENUMS -Xms256m
>-Xmx512m -Dsun.io.useCanonCaches=false -XX:MaxPermSize=512m
>-XX:+UseParallelGC -XX:+AggressiveHeap
>
>You would think 512mb is enough for the heap?   Am I giving it too much
>possibly?  
>
>This server has 1gb of ram. 
>
>Russ
>
>> -----Original Message-----
>> From: Oleg Gunkin [mailto:[EMAIL PROTECTED]
>> Sent: Monday, April 10, 2006 7:48 PM
>> To: CF-Talk
>> Subject: RE: java.lang.OutOfMemoryError: unable to create new native
>> thread
>> 
>> Coldfusion 7 needs more heap space than your JVM allows it to use. You
>> need to increase maximum heap size.
>> 
>> The following is for JSP, but solution is the same.
>> 
>> http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_17470
>> 
>> --
>> Oleg Gunkin
>> Email: [EMAIL PROTECTED]
>> Phone: (604) 666-9392
>> Emerging Technologies / Pacific Web Services
>> Information Technology Services
>> Public Works and Government Services Canada (Pacific)
>> 
>> 
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237786
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to