Jonathon,

Robi Sen has some excellent information on memory issues like you're
experiencing:

http://www.robisen.com/index.cfm?mode=entry&entry=FD4BE2FC-55DC-F2B1-FED0717
CC1C7E0AF

Are you using the default JRE? 

If so, you might consider upgrading to JRE SDK 1.4.2_13--which I believe is
the most recent version that CF "officially" supports.

Also, prior to CF8 the <cffile /> implementation for reading files was
notoriously problematic when reading large files (although it should be ok
on files from the 200K to 5MB range.)

Java is just not really good with large strings--it's always been a weakness
of the language.

You might want to consider going straight to Java to read a file
line-by-line (instead of the entire file.) Here's a UDF from CFlib that
shows reading a file by line:

http://www.cflib.org/udf.cfm?id=417&enable=1

This might help you reduce the memory needed for each request.

Lastly, make sure you're caching whatever results you can. If you're
constantly parsing the same files over and over, just cache the results once
you've generated them. There's no reason to keep doing expensive CPU
operations if it's unnecessary.

-Dan

>-----Original Message-----
>From: Jonathon Stierman [mailto:[EMAIL PROTECTED]
>Sent: Monday, December 17, 2007 10:58 PM
>To: CF-Talk
>Subject: memory issues
>
>An application of mine has recently been acting up -- memory has been
>shooting up at a fairly rapid pace this past week, and I'm at my wits end!
>Can't seem to find any way to fix it.  Here's the symptoms:
>
>After rebooting the CF service, memory starts out at about 60mb for the
>jrun.exe process.  After that all hell breaks loose ;)  It continues to
>consume about 4 megs a minute until it plateau's at about 590mb.  At that
>point, the server starts delivering "500 null" errors, and my
>application/exception.log files fill up with java.lang.OutOfMemoryError
>messages.
>
>The site gets a couple hits a second, and  those hits are fairly heavy in
>processing.  Most involve file-reading and then parsing that file for the
>relevant data.
>
>I have downloaded a trial version of FusionReactor and got that set up on
>the system.  If I'm reading it right, it looks like every request coming in
>is consuming large amounts of memory.  I can understand why they'd take up
>lots of memory -- each one has to read a text file that is between 200k and
>5 megs, and that seems to correlate with the memory jumps -- but why
>wouldn't that memory be released after the request is complete?  It just
>keeps piling up.
>
>Is this to be expected from high volumes of file-reading/parsing requests?
>What advice can you give for getting some of that memory free and
>available?
>
>Server monitoring and tweaking is definitely not my forte -- any help and
>knowledge will be much appreciated!
>
>TIA!
>
>Oh -- incase the box info helps.  It's a Windows Server 2003 dedicated
>server, running CFMX7 Standard.
>
>Jonathon
>
>
>
>

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:294990
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