• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

"Java heap space" error and coldfusion crashes

Guest
Mar 16, 2010 Mar 16, 2010

Copy link to clipboard

Copied

I have a coldfusion scheduled task that takes about two hours to run (about 4000 lines of code).  It does a number of cfquery, cffile, cfexecute with cffunction, cfloop, and cfif.  If works perfectly in the fifteen minute version that works with a subset of the data, but it frequently runs coldfusion out of java heap in the full record set run.  This then sometimes causes our public webserver to go down or malfunction until the coldfusion process is restarted.

When I posted about getting this to work initially last year, the solution was to put output="no" in every cffunction as apparently the whitespace generated by the code in all the cfloops was eventually enough to crash the server after a couple hours.

Recently, it has started to crash again as the record count has grown over the past year.  I put everything in a number of cfsilent tags, and it ran for one night, but now it is crashing again.

I'm not sure what to do next.  The cfexecutes log to a file not to a variable. The variables are in cffunction with var keyword with output="no" on the cffunction with coldfusion debugging checkboxes unchecked in the admin so in theory the fifteenth step/cffunction in the process should have the same memory available after garbage collection if needed as the first.  But obviously it doesn't as each step can run by itself but not sequentially unless limited in record count.

Any ideas?  Any known coldfusion memory leaks in 8,0,0,176276 Standard?  Any way to prevent coldfusion server from malfunctioning if one page runs it out of memory?

TOPICS
Getting started

Views

31.1K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 16, 2010 Mar 16, 2010

Copy link to clipboard

Copied

I might add that I've done everything justifyable already to upgrade the memory.  The box has more memory than the OS can use, and the OS has more memory that coldfusion will use.  Coldfusion has the highest JVM heap settings possible while being able to start up. (1450 MB) . Beyond dropping $30k on a 64 bit server, 64 bit OS, and coldfusion enterprise, there's nothing I know of to do with hardware or configuration.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 16, 2010 Mar 16, 2010

Copy link to clipboard

Copied

IF you can't upgrade to enterprise you are definitely limited in options.

With Enterprise, whether 64bit or not, you could run multiple instances of ColdFusion.  So you could have one instance with all of it's JVM memory dedicated to this resource consuming task, and another instance for your public web site.  This would at least allow application isolation so that the problems and failures of this task does not affect the other applications.

But even with that, it is not going to solve the underlining problem that you are using up all the memory.  There is always limits in programming.  We have come a long way from the days where years were stored as two digits instead of four digits to save memory so that applications would not run out of it.  But it is still possible to create tasks that just plain use more memory then is available.

When this happens you have to look at your application and see what you can do to make it more frugal with memory.  The first thought I had is does all this process have to be done in one request?  The main problem is that the JVM really can't do much with garbage collection in the middle of a request.

Once we had a task to create several hundred PDF reports on a nightly basis.  When we tried to do all of this in a single request it would quickly use up all the memory.  What we did was to break up the task into a series of process that would process a handful of reports and then using a simple META refresh, generate a new request to process the next batch.  This allowed all the variables used in the previous refresh to go to garbage collection and eventually get cleared out while new requests where processing other reports.  We could also throttle the processing with the time between META refreshes to allow the server some breathing room between requests.

This made the overall process run a while longer, but the server stopped failing in the middle of it.  Seemed a good compromise to us.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 16, 2010 Mar 16, 2010

Copy link to clipboard

Copied

P.S. I don't know if a META refresh would work with a scheduled task.  I don't think the built in browser that ColdFusion uses to make scheduled task http requests would understand or process the meta refresh.

But the same thing could be done with a master page that then makes a throttled series of <cfhttp....> http requests to a sub page that process a single batch at a time.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 16, 2010 Mar 16, 2010

Copy link to clipboard

Copied

I'm with Ian vis-a-vis his comments about CF Enterprise edition.  You seriously should not be running a process that heavy on your user-facing CF instance.

Beyond that, you seem to have made some efforts to minimise your memory footprint by guessing which bits of the code could need attention, but it doesn't seem like you've actually done any memory-usage profiling to check what's consuming the memory.

Nine times out of ten it will not be a CF memory leak causing this sort of thing, it will be injudicious or unexpected memory consumption by the code.

You should be verifying what's consuming the memory (using FusionReactor or the server monitoring build in to CF (Enterprise)).

You also might want to get a second pair of eyes to go over your code.  Having said that... I'm not sure I want to volunteer to eyeball 4000 lines of code... 😉

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 28, 2010 Oct 28, 2010

Copy link to clipboard

Copied

I too was having the same error.

I am running a long job posting products to Google via cfhttp post.

After about one our of running the job would crash with a "Java heap space error"

The job was set up to run in a loop collecting records preping them to a xml and then invoking a cfc that post them to Google.

After posting is complete it then returns to the driver program to collect more records and repeats.

By addingthe line <META HTTP-EQUIV="REFRESH" CONTENT="600">

to the header of the driver program it would restart with a fresh session allowing the

GC Garbage Collector of java to release the memory preventing the "Java heap space" error.

Problem solved thanks for the tip from  (ilssac)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Mar 16, 2010 Mar 16, 2010

Copy link to clipboard

Copied

Is there any other tool that you could use to accomplish this task?  If the ultimate objective of the task is not "to generate HTML output," it might be argued that you are simply using the wrong tool for the job -- even tough ColdFusion is, after a manner of speaking, doing it.

A very definite possibility here is that you are somehow building-up data within (e.g. global...) variables or hashes (structs...) that never get cleaned away.  They never get garbage-collected because they never become "un-referenced."

One strategy that might help alleviate the situation is to put all of your variable references into global structures, e.g. named GLOBAL and/or LOCAL.  Then, at the top of each processing loop, you insert a statement like:  <cfset GLOBAL = StructNew()> .  Now, explicitly, the old structure (and everything in it) is thrown-away and a new empty structure is allocated.  This happens each time through the loop.  If you need to retain the values of certain variables, add explicit code at the top of the loop that sets-aside these variables (in another, temporary, struct), resets the main global struct, puts the variables back, and then resets the temporary one before proceeding.

One of the characteristics of ColdFusion, particularly when you are using CFML tags vs. <cfscript>s, is that it is very easy for everything to wind up in a global scope.  Lots of things can hang-around in memory much longer than they need to.  All of which might not matter much if you are serving web pages (and recycling the worker-threads every so often), but it becomes a crippling concern when a thread runs for a very long time, such as multiple hours.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 16, 2010 Mar 16, 2010

Copy link to clipboard

Copied

One of the characteristics of ColdFusion, particularly when you are using CFML tags vs. <cfscript>s, is that it is very easy for everything to wind up in a global scope.

Interesting.  Do tell..?

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 16, 2010 Mar 16, 2010

Copy link to clipboard

Copied

I'm not sure what the reference between the tag and script form or CFML means.  But I presume he is refereeing to what I alluded to.  That if you do not take steps to cause different behavior, a great deal of the data in a request will end up in the variables scope and this scope is not going to be dereferenced for garbage collection until the end of the request.  Thus requests that run for a very long time can become problematic.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 10, 2014 Dec 10, 2014

Copy link to clipboard

Copied

I know this is an old thread and it might be bad form to post here, but because my question comes directly out of a response here, I thought I'd try starting with this.

I have a process that runs as an asynchronous gateway and takes a few hours to complete.  It's a relatively straightforward process where I start with a query of 15,000 items, then within a CFLOOP, I perform a bunch of additional queries and manipulation and finish with related products for that item.  I insert them into the database and move on to the next item.  I test it as a straight CFM with the async component/function calls commented out, and then when it's working, I update the async gateway.  Testing it as a CFM worked okay, but when I put it into the async CFC, it maxes out my JVM heap (a hefty 6Gb).  I went back to my CFM and tried to find anything I thought might be retaining objects in memory as the loop iterates, and I found TLC-IT Mar 16, 2010 12:14 PM post suggesting using a structure to contain variables and reinitializing it on every iteration of the loop, and that made a huge impact on the memory performance of my CFM.  It essentially reset my memory usage every time through the loop and stayed well below 0.5Gb max usage over the course of the process.  But then when I plugged that same code into the async CFC, I saw it resume accumulating memory as it ran--the per-iteration cleanup didn't seem to be happening.


So it seems like this behaves differently within an async CFC (or maybe just inside a CFC).  I need to figure out how to make each iteration of the loop a net wash, no (or as little as possible) memory retained on each pass through.  I don't understand why if I'm creating a structure at the start of the iteration and putting all my queries and variables into that scope, it's got anything to retain.  Is there some innate property of the cffunction, either within an async process or in itself that requires it to retain objects?  I have output="no" on the cffunction.  Do I also need returntype="void" (I don't need a return)?

My other question is: I've used async CFCs since they came out to run my long-running background jobs because it seemed like that's what they're for.  But should I consider using a straight CFM for something that can run 2-3 hours?  I know CF pretty much finishes a task once it starts, whether it's requested through the browser, via a scheduled task, or whatever, but I always worry that it'll just die off if it's not running as an async process.

This is on CF10 Enterprise, running JVM1.6.0_29.  I know that can be updated, but that requires a ton of retesting that I have trouble getting the time and resources for.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Dec 10, 2014 Dec 10, 2014

Copy link to clipboard

Copied

Hi,

This is certainly an old post to comment on.

Have not observed difference in memory consumption CFC vs CFM where both are doing same routine before but then I have not tested for that either.

Something you probably don't want to hear and possibly know however is worth stating Java 6 (1.6.0_29) is a long time Oracle end of life.

Could be interesting to run a Full garbage collection and see what happens to the 6Gb heap. This CFM may assist with that:

<cfset obj = createObject("java","java.lang.System")/>
   
    <cfset obj.gc()/>
   
    <cfset obj.runFinalization()/>

HTH, Carl.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 21, 2014 Dec 21, 2014

Copy link to clipboard

Copied

@Jarvis (and Carl), I’d wonder if perhaps something else is going on.

Jarvis, you say things go crazy when you put the code in an async gateway CFC instance. So first, what are the events upon which the instance is called? You don’t say. Do you think you can call it just once and things go crazy this way? Do you have any evidence that confirms it’s indeed being called only once? Perhaps for reasons you don’t now see, it may somehow be being called many more times than you expect, and that could explain the problem.

You could either do some logging to track how often it’s called, or you may be able to see it in CF’s logs or the CF Server Monitor (since you say you’re running CF Enterprise).

Or even if the CFC instance is called only once, you do mention doing things in a loop. Do you have any confirmation that you’re ONLY doing things the number of times you expect? Again, you could add some logging to prove it. You may find you’re somehow calling code more often than you presume. I know that may seem unlikely, but it’s a good sanity check.

Finally, you mention making things work by commenting out “the async component/function calls”. So are these within the CFC itself? Or a page calling it? Here again, if it’s in some other page that’s calling it, do you know that that page is being called only once, or that it may not have some unexpected loop in it?

I’d just be inclined to think there’s some explanation other than that CF inherently uses more memory to do even your complex operation just because it’s in a CFC, and/or specifically an event gateway CFC.

Please do let us know what you may find.

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Dec 22, 2014 Dec 22, 2014

Copy link to clipboard

Copied

Thanks for the suggestions/questions, Charlie.  But yes, I'm sure that the process is only doing what it's supposed to be doing.  The async gateway is only called once (confirmed by the counts in the admin), and the loop is iterating as it should and executing the code in the loop just once for each item.  I added more logging to confirm this.

The issue seems to be that variables are being held and not recycled the same way when the process runs as a cffunction.  The async part appears to be somewhat immaterial now--I ran it as a straight call to a cfc/method and had the same memory accumulation issue.  But running it as a cfm cleans up the memory on every iteration of the loop.  I'm not sure if my strategy of putting all the variables in a structure and then reinitializing it on every iteration just doesn't work the same within a cffunction, or if there's some other variables it's holding onto because it's running as a function.  I made sure my function is set with output="no" returntype="void" so it shouldn't be retaining anything to be returned or output, but it still just keeps accumulating memory as it goes.

For now, I think I'm able to kick off the cfm version via a cfhttp call at the end of the preceding process, let that call timeout and have it just keep running in the background, but I much prefer the security of an async call to know that it's being run in the background properly.  Mysterious and a bit crazy-making.  After Christmas, I'll probably try experimenting with it some more.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Dec 23, 2014 Dec 23, 2014

Copy link to clipboard

Copied

LATEST

Oh, ok. So now it seems more clear, in that you say that it has trouble when run “as a function”, and especially when you confirm that it has the problem even when called that way not as a gateway.

I didn’t realize you were saying previously that you were running it one way as a function and the other way not. (I do see it now, as you say in your first note, “Is there some innate property of the cffunction, either within an async process or in itself that requires it to retain objects?” Sorry I missed that.) And say also here, “The issue seems to be that variables are being held and not recycled the same way when the process runs as a cffunction.”

So yes, I think you’ve hit the nail on the head, and I suspect now that your problem is the “var scope bug”. You don’t mention whether you are VAR-scoping your variables within the function—indeed, the fact that you could run the code without it being in a function or within one is proof that you are not, because if you VAR-scoped your variables the code would NOT run outside a function.

So what’s “var scoping”, and why might your failure to do it be key to your problem? Rather than elaborate, I’d point you to a blog entry I did some years ago, where I gathered up what were then several of the best resources on the subject. It’s not new. It started happening with CF6, and an ill-fated decision by the engineers to not treat variables within a function as local to that function, like most other languages. Using the VAR keyword (or as of CF9, using the local scope) will force the variables to be local to the function. And it’s possible (I’m not promising, but it’s possible) that doing that may resolve your problem.

The resources I point to explain the issue (including unexpected memory consumption), and even offer demonstrations as well as tools for resolution/remediation. Check it out:

http://www.carehart.org/blog/client/index.cfm/2010/3/4/resources_on_the_var_scope_problem

And let us know how things go.

/charlie


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

I'm not consuming memory with left over variables (at least ones I've explicitly created).  As I already said, all the relevant variables are in a cffunction with the var keyword.  This is occasionally verified by scope cfdumps outside of the cffunction scope.  I've been staring at this code trying to optimize it for memory for a year so please give me a little creditibility.

Splitting up the sequential process into multiple requests is a complication with consequences which should be unnecessary and is not desired.  I appreciate your efforts to find me a workaround though, and in fact I broke the sequential process into three scheduled tasks which is stopping the server crashes for the moment.  I believe this to be only temporary fix though.

I agree Coldfusion is not the best tool for the job but it should be adequate.  Eventually I'll rewrite it in Java.  As programmers, we often don't have control over what language we write in.  It has to be on an outward facing server as there are webservices part of the application, but I'm considering an outward facing server other than our primary webserver.

Wish I had Enterprise, but I don't have it.  Dropping $7K instead of $1K for the same product is a hard sell at my company.

I don't have FusionReactor either.  It looks like a nice program, but I can't justify spending $299 on software that I would use for an hour and might not even help.  Not sure I want to install a trial version on our production server either.

I think this is what I'm looking for:

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=D:\heapdumps

(combined with jhat from the JDK)

Anyone ever try this with ColdFusion and find it detailed and understandable enough to determine what is running ColdFusion out of memory?  I'm dreading coming in on off hours to try it out and it telling me that there are 300,000,000 instances of "java.util.string" with little hint to what is causing them..

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

Point One:  All systems have limits.  Sometimes you just have to say that this is all that we can do with the tools we have to work with.  To quote Mr. Scotty, "I can not change the laws of physics Captain!"/

Point Two:  ColdFusion is optimized as a web application server.  As such it focuses on the request as an atomic unit.  It does not naturally try to do overhead, housekeeping tasks, such as garbage collection, during a request.

You can either try to break up your tasks into multiple requests to work within this framework, or you can try other garbage collection and JVM memory management settings.  But realize with the latter option you are choosing to optimize your CF to handle this scheduled task, which could have performance consequences to the day to day web severing tasks the server is also expected to perform.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Mar 18, 2010 Mar 18, 2010

Copy link to clipboard

Copied

So you're prepared to have flaky code that crashes the server, but you're not prepared to have a trial version of a very robust piece of software which will help you solve your problem?  Where's the logic there?

Equally... $299... how many person-hours is that?  Stuff all.  How much mucking around have you already done, and how much mucking around will you still need to do?  If it's an more than about three hours in total, you're costing your employers more money with your current approach than buying the software and short-circuiting all the blind fumbling about (no offence meant), replacing it with targetted, quick analysis.  Obviously having identified any problem there's still the person/hour cost to fix it, but you will slice your investigation time back drastically.

Beyond a point, it's not sensible (it's actually irresponsible, I think) to not tool-up and do the job properly.

Also, once you've got FusionReactor, you can run it over the rest of your code, and test new code with it when it's in QA or UAT.  It really is very good at turning up sub-optimal code, which when fixed bring good performance gains.  Just because code doesn't crash does it mean it's healthy code, after all.  It's a pretty low benchmark to set that "as long as it doesn't crash, it's fine".

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 20, 2010 Apr 20, 2010

Copy link to clipboard

Copied

It started crashing again, but I believe I solved it partially.  Here's how I worked the problem and what I did in the end.

I had my company's credit card in hand ready to purchase FusionReactor at yalls suggestion, but after a couple discussions with a couple people at FusionReactor it was revealed that it does not do heap analysis (beyond current state summary numbers) so it would only reveal which thread was using up the memory.  It might hint at memory usage detail when combined with FusionDebug when stepping through lines of code and looking at changes in summary numbers, but luckily there was a better path than buying two $299 products to hint at the answer.  I might add that they are quite nice products that I'm consdering buying anyway, but they are not a slam dunk solution to needing to determine coldfusion memory usage detail when everything is pointing to ColdFusion internals holding the memory.

What I did was I added

-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=D:/memdump

to the Coldfusion JVM arguments.

Then when it crashed I used Eclipse with MAT plugin to browse the heap dump.  As expected, the heap dump was not interpreted (i.e. you couldn't tie memory very easily to a coldfusion variable by name).  It showed the memory was being used up by char[] variable types.  The largest one was one that begun with whitespace for a particular thread so I assumed it was page output.  Since I already had dozens of <cfsilent>'s and almost all code inside of <cffunction> with output="no", this was troubling.

What I ended up trying was adding:

<cfsetting enablecfoutputonly="true"> at the beginning of pages

and

<cfsetting enablecfoutputonly="false"> at the end of pages (it's a peculiar tag but this is apparently the best practices for this setting)

and then adding <cfoutput> around where I was worried it inappropriately might not generate special-purpose output (e.g. body of cfmail, etc.)

Apparently this helped Coldfusion to not run itself out of memory despite already being inside both a cfsilent and inside a cffunction with output="no".

There was another mysterious large char[], but I was unable to determine what that was.  Wish there was a heap browsing tool for ColdFusion that fully inteprets everything!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Sep 11, 2012 Sep 11, 2012

Copy link to clipboard

Copied

We have the same issue and it appears as we look around in the web that the garbage collection isn't designed very well. amybe ask to fix it in CF11 http://coldfusion.uservoice.com

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Sep 11, 2012 Sep 11, 2012

Copy link to clipboard

Copied

Wow Rob waking up a March 2010 thread. CF is Java and java garbage collects. There are many ways you can adjust CF (java) memory and GC routines. Best to do some kind of logging or analysis to know what is going on, then armed with knowing what is happening make an adjustment to memory, GC or both and monitor some more.

Regards, Carl.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 02, 2013 Apr 02, 2013

Copy link to clipboard

Copied

I know this is an old threat, but its the most detailed I've seen and touches on something I am looking for.

I've been experiencing an issue where the mail spool crashes and stops delivering cfmail until the mail service is restarted or CF is restarted.  Upon investigation, in my most recent crash I noticed that at the same time the spool stopped, I had a GC limit issue.  I just doubled my heap size from 512 to 1024.  I have 16gb of ram on the server and task manger's performance tells me I'm using no more than 6.5gb.

How would someone go into more detail to find out what would cause the GC issue?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 02, 2013 Apr 02, 2013

Copy link to clipboard

Copied

Hi,

Can you share your jvm config with us. What is the MaxPermSize defined and which GC are you using?

Regards,

Anit Kumar

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 02, 2013 Apr 02, 2013

Copy link to clipboard

Copied

I am not very familiar with the info your asking for. 

Here is the 1 piece I found:

-server -Dsun.io.useCanonCaches=false -XX:MaxPermSize=192m -XX:+UseParallelGC -Dcoldfusion.rootDir={application.home}/../ -Dcoldfusion.libPath={application.home}/../lib -Dcoldfusion.fckupload=true

If it helps, windows 2008 r2, default installation, with basically nothing changed.

JVM Details
Java Version1.6.0_17 
Java VendorSun Microsystems Inc. 
Java Vendor URLhttp://java.sun.com/
Java HomeC:\ColdFusion9\runtime\jre 
Java File EncodingCp1252 
Java Default Localeen_US 
File Separator
Path Separator
Line SeparatorChr(13)
User NameABCDEFG
User HomeC:\ 
User DirC:\ColdFusion9\runtime\bin 
Java VM Specification Version1.0 
Java VM Specification VendorSun Microsystems Inc. 
Java VM Specification NameJava Virtual Machine Specification 
Java VM Version14.3-b01 
Java VM VendorSun Microsystems Inc. 
Java VM NameJava HotSpot(TM) Server VM 
Java Specification Version1.6 
Java Specification VendorSun Microsystems Inc. 
Java Specification NameJava Platform API Specification 
Java Class Version50.0 
CF Server Java Class Path;C:/ColdFusion9/runtime/../lib/updates/hf901-00001.jar;  C:/ColdFusion9/runtime/../lib/activation.jar;  C:/ColdFusion9/runtime/../lib/ant-launcher.jar;  C:/ColdFusion9/runtime/../lib/ant.jar;  C:/ColdFusion9/runtime/../lib/antlr-2.7.6.jar;  C:/ColdFusion9/runtime/../lib/apache-solr-core.jar;  C:/ColdFusion9/runtime/../lib/apache-solr-solrj.jar;  C:/ColdFusion9/runtime/../lib/asn1.jar;  C:/ColdFusion9/runtime/../lib/axis.jar;  C:/ColdFusion9/runtime/../lib/backport-util-concurrent.jar;  C:/ColdFusion9/runtime/../lib/bcel-5.1-jnbridge.jar;  C:/ColdFusion9/runtime/../lib/bcel.jar;  C:/ColdFusion9/runtime/../lib/bcmail-jdk14-139.jar;  C:/ColdFusion9/runtime/../lib/bcprov-jdk14-139.jar;  C:/ColdFusion9/runtime/../lib/cdo.jar;  C:/ColdFusion9/runtime/../lib/cdohost.jar;  C:/ColdFusion9/runtime/../lib/certj.jar;  C:/ColdFusion9/runtime/../lib/cf-acrobat.jar;  C:/ColdFusion9/runtime/../lib/cf-assembler.jar;  C:/ColdFusion9/runtime/../lib/cf-logging.jar;  C:/ColdFusion9/runtime/../lib/cf4was.jar;  C:/ColdFusion9/runtime/../lib/cf4was_ae.jar;  C:/ColdFusion9/runtime/../lib/cfusion-req.jar;  C:/ColdFusion9/runtime/../lib/cfusion.jar;  C:/ColdFusion9/runtime/../lib/clibwrapper_jiio.jar;  C:/ColdFusion9/runtime/../lib/commons-beanutils-1.8.0.jar;  C:/ColdFusion9/runtime/../lib/commons-codec-1.3.jar;  C:/ColdFusion9/runtime/../lib/commons-collections-3.2.1.jar;  C:/ColdFusion9/runtime/../lib/commons-digester-2.0.jar;  C:/ColdFusion9/runtime/../lib/commons-discovery-0.4.jar;  C:/ColdFusion9/runtime/../lib/commons-fileupload-1.2.jar;  C:/ColdFusion9/runtime/../lib/commons-httpclient-3.1.jar;  C:/ColdFusion9/runtime/../lib/commons-lang-2.4.jar;  C:/ColdFusion9/runtime/../lib/commons-logging-1.1.1.jar;  C:/ColdFusion9/runtime/../lib/commons-logging-api-1.1.1.jar;  C:/ColdFusion9/runtime/../lib/commons-net-2.0.jar;  C:/ColdFusion9/runtime/../lib/commons-vfs-1.0.jar;  C:/ColdFusion9/runtime/../lib/crystal.jar;  C:/ColdFusion9/runtime/../lib/derby.jar;  C:/ColdFusion9/runtime/../lib/derbyclient.jar;  C:/ColdFusion9/runtime/../lib/derbynet.jar;  C:/ColdFusion9/runtime/../lib/derbyrun.jar;  C:/ColdFusion9/runtime/../lib/derbytools.jar;  C:/ColdFusion9/runtime/../lib/dom4j-1.6.1.jar;  C:/ColdFusion9/runtime/../lib/ehcache-web.jar;  C:/ColdFusion9/runtime/../lib/ehcache.jar;  C:/ColdFusion9/runtime/../lib/esapi-2.0_rc10.jar;  C:/ColdFusion9/runtime/../lib/FCSj.jar;  C:/ColdFusion9/runtime/../lib/flashgateway.jar;  C:/ColdFusion9/runtime/../lib/flex-messaging-common.jar;  C:/ColdFusion9/runtime/../lib/flex-messaging-core.jar;  C:/ColdFusion9/runtime/../lib/flex-messaging-opt.jar;  C:/ColdFusion9/runtime/../lib/flex-messaging-proxy.jar;  C:/ColdFusion9/runtime/../lib/flex-messaging-remoting.jar;  C:/ColdFusion9/runtime/../lib/flex-rds-server.jar;  C:/ColdFusion9/runtime/../lib/geronimo-stax-api_1.0_spec-1.0.1.jar;  C:/ColdFusion9/runtime/../lib/hibernate3.jar;  C:/ColdFusion9/runtime/../lib/httpclient.jar;  C:/ColdFusion9/runtime/../lib/ib6addonpatch.jar;  C:/ColdFusion9/runtime/../lib/ib6core.jar;  C:/ColdFusion9/runtime/../lib/ib6http.jar;  C:/ColdFusion9/runtime/../lib/ib6swing.jar;  C:/ColdFusion9/runtime/../lib/ib6util.jar;  C:/ColdFusion9/runtime/../lib/im.jar;  C:/ColdFusion9/runtime/../lib/iText.jar;  C:/ColdFusion9/runtime/../lib/iTextAsian.jar;  C:/ColdFusion9/runtime/../lib/izmado.jar;  C:/ColdFusion9/runtime/../lib/jai_codec.jar;  C:/ColdFusion9/runtime/../lib/jai_core.jar;  C:/ColdFusion9/runtime/../lib/jai_imageio.jar;  C:/ColdFusion9/runtime/../lib/jakarta-oro-2.0.6.jar;  C:/ColdFusion9/runtime/../lib/jakarta-slide-webdavlib-2.1.jar;  C:/ColdFusion9/runtime/../lib/java-xmlbuilder-1.jar;  C:/ColdFusion9/runtime/../lib/java2wsdl.jar;  C:/ColdFusion9/runtime/../lib/jax-qname.jar;  C:/ColdFusion9/runtime/../lib/jaxb-api.jar;  C:/ColdFusion9/runtime/../lib/jaxb-impl.jar;  C:/ColdFusion9/runtime/../lib/jaxb-libs.jar;  C:/ColdFusion9/runtime/../lib/jaxb-xjc.jar;  C:/ColdFusion9/runtime/../lib/jaxrpc.jar;  C:/ColdFusion9/runtime/../lib/jdom-1.0.jar;  C:/ColdFusion9/runtime/../lib/jeb.jar;  C:/ColdFusion9/runtime/../lib/jets3t-0.7.3.jar;  C:/ColdFusion9/runtime/../lib/jetty-continuation-7.0.0.v20091005.jar;  C:/ColdFusion9/runtime/../lib/jetty-http-7.0.0.v20091005.jar;  C:/ColdFusion9/runtime/../lib/jetty-io-7.0.0.v20091005.jar;  C:/ColdFusion9/runtime/../lib/jetty-security-7.0.0.v20091005.jar;  C:/ColdFusion9/runtime/../lib/jetty-server-7.0.0.v20091005.jar;  C:/ColdFusion9/runtime/../lib/jetty-servlet-7.0.0.v20091005.jar;  C:/ColdFusion9/runtime/../lib/jetty-servlets-7.0.0.v20091005.jar;  C:/ColdFusion9/runtime/../lib/jetty-util-7.0.0.v20091005.jar;  C:/ColdFusion9/runtime/../lib/jetty-xml-7.0.0.v20091005.jar;  C:/ColdFusion9/runtime/../lib/jintegra.jar;  C:/ColdFusion9/runtime/../lib/jnbcore.jar;  C:/ColdFusion9/runtime/../lib/jpedal.jar;  C:/ColdFusion9/runtime/../lib/js.jar;  C:/ColdFusion9/runtime/../lib/jsch-0.1.41m.jar;  C:/ColdFusion9/runtime/../lib/jsr107cache.jar;  C:/ColdFusion9/runtime/../lib/jutf7-0.9.0.jar;  C:/ColdFusion9/runtime/../lib/ldap.jar;  C:/ColdFusion9/runtime/../lib/ldapbp.jar;  C:/ColdFusion9/runtime/../lib/log4j-1.2.15.jar;  C:/ColdFusion9/runtime/../lib/lucene-analyzers.jar;  C:/ColdFusion9/runtime/../lib/lucene.jar;  C:/ColdFusion9/runtime/../lib/lucenedemo.jar;  C:/ColdFusion9/runtime/../lib/macromedia_drivers.jar;  C:/ColdFusion9/runtime/../lib/mail.jar;  C:/ColdFusion9/runtime/../lib/metadata-extractor-2.4.0-beta-1.jar;  C:/ColdFusion9/runtime/../lib/mlibwrapper_jai.jar;  C:/ColdFusion9/runtime/../lib/msapps.jar;  C:/ColdFusion9/runtime/../lib/mysql-connector-java-commercial-5.1.11-bin.jar;  C:/ColdFusion9/runtime/../lib/namespace.jar;  C:/ColdFusion9/runtime/../lib/nekohtml.jar;  C:/ColdFusion9/runtime/../lib/ooxml-schemas.jar;  C:/ColdFusion9/runtime/../lib/pdfencryption.jar;  C:/ColdFusion9/runtime/../lib/poi-contrib.jar;  C:/ColdFusion9/runtime/../lib/poi-ooxml-schemas.jar;  C:/ColdFusion9/runtime/../lib/poi-ooxml.jar;  C:/ColdFusion9/runtime/../lib/poi-scratchpad.jar;  C:/ColdFusion9/runtime/../lib/poi.jar;  C:/ColdFusion9/runtime/../lib/portlet_20.jar;  C:/ColdFusion9/runtime/../lib/postgresql-8.3-604.jdbc3.jar;  C:/ColdFusion9/runtime/../lib/relaxngDatatype.jar;  C:/ColdFusion9/runtime/../lib/ri_generic.jar;  C:/ColdFusion9/runtime/../lib/rome-cf.jar;  C:/ColdFusion9/runtime/../lib/saaj.jar;  C:/ColdFusion9/runtime/../lib/serializer.jar;  C:/ColdFusion9/runtime/../lib/slf4j-api-1.5.6.jar;  C:/ColdFusion9/runtime/../lib/slf4j-log4j12-1.5.6.jar;  C:/ColdFusion9/runtime/../lib/smack.jar;  C:/ColdFusion9/runtime/../lib/smpp.jar;  C:/ColdFusion9/runtime/../lib/STComm.jar;  C:/ColdFusion9/runtime/../lib/tika-core-0.6.jar;  C:/ColdFusion9/runtime/../lib/tika-parsers-0.6.jar;  C:/ColdFusion9/runtime/../lib/tools.jar;  C:/ColdFusion9/runtime/../lib/tt-bytecode.jar;  C:/ColdFusion9/runtime/../lib/vadmin.jar;  C:/ColdFusion9/runtime/../lib/verity.jar;  C:/ColdFusion9/runtime/../lib/vparametric.jar;  C:/ColdFusion9/runtime/../lib/vsearch.jar;  C:/ColdFusion9/runtime/../lib/wc50.jar;  C:/ColdFusion9/runtime/../lib/webchartsJava2D.jar;  C:/ColdFusion9/runtime/../lib/wsdl2java.jar;  C:/ColdFusion9/runtime/../lib/wsdl4j-1.5.1.jar;  C:/ColdFusion9/runtime/../lib/wsrp4j-commons-0.5-SNAPSHOT.jar;  C:/ColdFusion9/runtime/../lib/wsrp4j-producer.jar;  C:/ColdFusion9/runtime/../lib/xalan.jar;  C:/ColdFusion9/runtime/../lib/xercesImpl.jar;  C:/ColdFusion9/runtime/../lib/xml-apis.jar;  C:/ColdFusion9/runtime/../lib/xmlbeans-2.3.0.jar;  C:/ColdFusion9/runtime/../lib/xmpcore.jar;  C:/ColdFusion9/runtime/../lib/xsdlib.jar;  C:/ColdFusion9/runtime/../lib/;  C:/ColdFusion9/runtime/../gateway/lib/examples.jar;  C:/ColdFusion9/runtime/../gateway/lib/;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/flex/jars/cfgatewayadapter.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/flex/jars/concurrent.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/flex/jars/;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/batik-awt-util.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/batik-css.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/batik-ext.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/batik-transcoder.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/batik-util.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/commons-discovery.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/commons-logging.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/concurrent.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/flex.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/jakarta-oro-2.0.7.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/jcert.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/jnet.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/jsse.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/oscache.jar;  C:/ColdFusion9/runtime/../wwwroot/WEB-INF/cfform/jars/; 
Java Class PathC:\ColdFusion9\runtime\servers\lib;
C:\ColdFusion9\runtime\servers\lib\jrun-patch.jar;
C:\ColdFusion9\runtime\..\lib\macromedia_drivers.jar;
C:\ColdFusion9\runtime\lib\cfmx_mbean.jar;
C:\ColdFusion9\runtime\..\lib\oosdk\classes;
C:\ColdFusion9\runtime\..\lib\oosdk\lib;
C:\ColdFusion9\runtime\..\lib\oosdk\lib\juh.jar;
C:\ColdFusion9\runtime\..\lib\oosdk\lib\jurt.jar;
C:\ColdFusion9\runtime\..\lib\oosdk\lib\ridl.jar;
C:\ColdFusion9\runtime\..\lib\oosdk\lib\unoil.jar;
C:\ColdFusion9\runtime\lib;
C:\ColdFusion9\runtime\lib\cfmx_mbean.jar;
C:\ColdFusion9\runtime\lib\instutil.jar;
C:\ColdFusion9\runtime\lib\java2wsdl.jar;
C:\ColdFusion9\runtime\lib\jrun-ant-tasks.jar;
C:\ColdFusion9\runtime\lib\jrun-xdoclet.jar;
C:\ColdFusion9\runtime\lib\jrun.jar;
C:\ColdFusion9\runtime\lib\jspc.jar;
C:\ColdFusion9\runtime\lib\migrate.jar;
C:\ColdFusion9\runtime\lib\oem-xdoclet.jar;
C:\ColdFusion9\runtime\lib\sniffer.jar;
C:\ColdFusion9\runtime\lib\webservices.jar;
C:\ColdFusion9\runtime\lib\wsconfig.jar;
C:\ColdFusion9\runtime\lib\wsdl2java.jar;
C:\ColdFusion9\runtime\lib\xmlscript.jar;
C:\ColdFusion9\runtime\lib\jrun.jar 
Java Ext DirsC:\ColdFusion9\runtime\jre\lib\ext;C:\Windows\Sun\Java\lib\ext 

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Employee ,
Apr 02, 2013 Apr 02, 2013

Copy link to clipboard

Copied

Hi,

Thank you for sharing the info. You can try changing the -XX:MaxPermSize=256m. Save the file and restart the services. A more detailed explanation regarding managing your system memory is available at http://docs.oracle.com/cd/E13222_01/wls/docs81/perform/JVMTuning.html. You can refer to http://www.adobe.com/devnet/coldfusion/articles/coldfusion_performance.html  for performance tunning as well.

Regards,

Anit Kumar

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 02, 2013 Apr 02, 2013

Copy link to clipboard

Copied

Thanks, I will fine tune that on next reboot.

As it relates to cfmail spool crashing:

This is an issue that I have personally been experiencing since CF5 and all the versions since.  Each of the following links document people with the same issue too.  Is there a bug in this "mailSpoolService" that needs to be fixed?

http://www.cutterscrossing.com/index.cfm/2006/12/10/ColdFusion-Mail-Spool-Lock (2006)

http://house-of-fusion.10909.n7.nabble.com/cfmail-stuck-in-spool-td112530.html (2007)

http://stackoverflow.com/questions/94932/coldfusion-mail-queue-stops-processing (2009)

Its very frustrating when customer(s) call you to tell you that their emails aren't going out and you ultimately have to restart coldfusion, or attempt to restart the service.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation