Thanks for the info and tips, Brad!

Photos are downloaded via cfftp.
And yes, cfdirectory and cffile are used to move thing around.

RAM's coming soon...


-----Original Message-----
From: b...@bradwood.com [mailto:b...@bradwood.com] 
Sent: Tuesday, September 15, 2009 5:17 PM
To: cf-talk
Subject: RE: What is the most like cause lf "Java Heap Space" error?


Woah, I wouldn't reduce it.  If your server is already running out of
memory, the last thing it needs is less to work with.

Garbage collection is an automatic process of your JVM that reclaims
used memory as free space if it is no longer being used.  
http://en.wikipedia.org/wiki/Garbage_collection_(computer_science)

All the things your requests create when they run stay in memory after
the thread is finished.  GC runs on a schedule and looks for any objects
in memory that have no hard references for them and removes them. 
There's a actually at least two types of GC depending on which part of
the heap the objects are living in.  It's a rather deep topic, and I
recommend you read up on it.

http://www.javaworld.com/javaworld/jw-08-1996/jw-08-gc.html

Windows process manager will show you how much RAM has been devoted to
your JRUN process.  SeeFusion (Or Fusion-Reactor) will show you how much
is actually being used.  Here is some CFML code that will also give you
that information:
http://www.coldfusionmuse.com/index.cfm/2008/2/12/leaky.heap.jvm

If you want it broken down any further, you have to get into some Java
tools like JMeter:
http://zacster.blogspot.com/2008/03/quick-howto-to-setup-jmeter.html

Your next post stated that you are using pkzip25.exe to do the
unzipping.  Since pkzip runs as its own Windows process with its own
memory space, you need to first identify where the memory on your server
is going.  Use the process manager to see how much each process is
consuming.

Then you need to break down your tasks into their parts and run each
while watching the memory being used.  How are the photos "downloaded"? 
CFHTTP?  Are you using cfdirectory and cffile to move them around?  You
might need to look into some command line executables for doing that
heavy lifting stuff outside of the CF process.

And buy more RAM.  Regardless of whether that really is your problem.
your server will thank you.  I hate to think of your swap usage with
that low of a head room especially with SQL and FTP all running on the
same box.

~Brad





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:326342
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to