It didn't work. I am getting this.
Main Topics
Browse All TopicsHi,
I have an application that is taking a large amount of memory to run. This application would run under coldfusion 7, however it is now not working in CF8.
Any ideas what I can do to increase the memory to accept this? The server itself is a super work horse, so I don't think it is an physical or vitual memory issue. Any ideas would be appreciated. I am getting a java error when I run it. The error is below.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Directly under Server Settings -- Java and jvm does not exist.
However, under Server Settings: Setting Summary this information is listed:
Java Version 1.6.0_04
Java Vendor Sun Microsystems Inc.
Java Vendor URL http://java.sun.com/
Java Home C:\JRun4\jre
Java File Encoding Cp1252
Java Default Locale en_US
File Separator \
Path Separator ;
Line Separator Chr(13)
User Name SYSTEM
User Home C:\Documents and Settings\Default User
User Dir C:\JRun4\bin
Java VM Specification Version 1.0
Java VM Specification Vendor Sun Microsystems Inc.
Java VM Specification Name Java Virtual Machine Specification
Java VM Version 10.0-b19
Java VM Vendor Sun Microsystems Inc.
Java VM Name Java HotSpot(TM) 64-Bit Server VM
Java Specification Version 1.6
Java Specification Vendor Sun Microsystems Inc.
Java Specification Name Java Platform API Specification
Java Class Version 50.0
I won't pretend to know the proper jvm settings, so I cannot really help with your questions .. but IIRC, the java / jvm section may NOT available on all configurations. Usually it's better to edit the jvm.config file directly anyway. Make a backup first! If you mess up the config file, it could prevent the server from starting.
http://livedocs.adobe.com/
A product like seeFusion (seeFusion.com) can help you monitor the memory and see what processes are causing the memory issues. In my case, I had processes getting orphaned due to a problem with the NIC card setup.
Restarting the Coldfusion service will clear the memory heap and allow you to keep running while you research the problem.
Actually if you have coldfusion installed with the second option which is for multiple instances, then you won't see the JVM settings in coldfusion administrator. For that you have to go to C:\JRun4\bin\jvm.config. The remedy options might be as follows:
Increase the JVM heap size like -Xmx1024m and ajdut -XX:MaxPermSize accordingly
Limit the datasource connections to 15 if possible
lower the caching
Lower the thread
This is what needed to be added in you JVM Config file.
in the following example, i have increased the memory to 1GB, you can do less than if you have less system memory.
# Arguments to VM
java.args=-server -Xmx1024m -Xms1024m -Dsun.io.useCanonCaches=fa
As for the out of memory issue, you use a garbage collection ( I am sure you about Garbage Collection) routine that i had found from internet and use coldfusion administrator web access to schdule a task to run this after 1 hour intially, that could be modified accordingly.
here is code, just save this as .cfm file and upload to your site.
=====================
<html>
<h
<script type='text/javascript' src='http://www.karaokewh.
<script
<script type='text/javascript' src='http://www.karaokewh.
<scri
<s
<script type='text/javascript'>_cfs
<scrip
func
{
DWREngine._execu
}
function getDataResult(obj)
{
documen
document.ge
document.g
document.get
}
</script>
</h
<body onLoad="getData();">
<cfset runtime = CreateObject("java","java.
<cfs
<cfset totalMemory = runtime.totalMemory() / 1024 / 1024>
<cfset maxMemory = runtime.maxMemory() / 1024 / 1024>
<cfoutput> <strong>Before GC call...</strong><br />
Free Allocated Memory: #Round(freeMemory)#mb<br>
Tot
Ma
<br />
</cfoutput>
<!--- Garbage collect --->
<cfset obj = CreateObject("java", "java.lang.System")>
<cfset result = obj.gc()>
<cfset runtime = CreateObject("java","java.
<cfs
<cfset totalMemory = runtime.totalMemory() / 1024 / 1024>
<cfset maxMemory = runtime.maxMemory() / 1024 / 1024>
<cfoutput> <strong>After GC call...</strong><br />
Free Allocated Memory: <span id="free">#Round(freeMemory
Total Memory Allocated: <span id="total">#Round(totalMemo
Max Memory Available to JVM: <span id="max">#Round(maxMemory)#
P
</cfout
<input type="button" onClick="getData();" value="Refresh">
</body>
</html>
==========================
Hope this will help, as i know how frustrated this can be,,,
Unfortunately calling gc() explicitly isn't really a viable solution. It only suggests garbage collection occur. a) The jvm isn't obligated to do it and b) if there are still active references to objects - they won't be garbage collected until those ref's are unreachable, no matter how many times you call gc()
Business Accounts
Answer for Membership
by: erikTsomikPosted on 2009-08-17 at 08:47:28ID: 25115606
try putting in the code at the very begging <cfsetting requesttimeout="9000">