Ok,

 

I’ve fixed this, but for all you people who rely on CF memory management, DON’T!

 

Here’s the code

 

<!--- Get list of files --->

<cfdirectory name="files" directory="#application.config.dataFileRoot#" />

 

<!--- Loop through each file --->

<cfloop query="files">

      <!--- Decrypt File --->

      <cfinvoke component="com.cogstate.ice" method="decryptFile" returnvariable="myFile">

            <cfinvokeargument name="fileName" value="#directory#\#name#" />

      </cfinvoke>

     

      <!--- Get Results --->

      <cfinvoke component="com.cogstate.data" method="getResults" returnvariable="myStruct">

            <cfinvokeargument name="data" value="#myFile#" />

      </cfinvoke>

     

      <!--- Populate Database --->

      <cfinvoke component="com.cogstate.data" method="putResults">

            <cfinvokeargument name="data" value="#myStruct#" />

            <cfinvokeargument name="fileName" value="#name#" />

            <cfinvokeargument name="received" value="#receivedDate#" />

      </cfinvoke>

     

      <!--- Cleanup --->

      <cfset myFile = "" />

      <cfset myStruct = "" />

</cfloop>

 

Now the cleanup bit at the end fixed it, CF was running out of memory, I watched it happen on the server using task manager.

 

When I put the two <cfset ‘s in the memory went up a couple meg then down a couple meg rather than going from 70 to 500 and dying.

 

I used

 

<cfsetting enablecfoutputonly="yes" />

 

At the top of the page to ensure I don’t get lots of white space, I’m assuming this is only valid for the current page and won’t affect other pages.

Regards
Dale Fraser


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Joel Cass
Sent: Tuesday, 23 May 2006 17:39 PM
To: [email protected]
Subject: [cfaussie] Re: JRUN Servlet Error

 

If you're using components / functions, you could try adding output=false to the cfcomponent / cffunction tags..?

 

I'm pretty sure cfsilent works like a custom tag, saving the content but only removing it once the end tag has been processed.

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]On Behalf Of Dale Fraser
Sent: Tuesday, 23 May 2006 5:34 PM
To: [email protected]
Subject: [cfaussie] Re: JRUN Servlet Error

Yeah,

 

I managed to save the error page to disk, and it’s a whole lot of blank lines.

 

I put a <CFSILENT around my <CFINVOKES but still getting this error.

 

I think it’s a memory issue, I’m reading a lot of text files, and populating a big structure of arrays of structures etc etc.

 

No I’m only creating one per file and reusing the same name, but I don’t think coldfusion is cleaning them up! My memory on JRUN goes for 74m to 500m physical & virtual within about 2 minutes of running this application.

 

How can I force my variables to clean up after each iteration / file.

Regards
Dale Fraser


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Joel Cass
Sent: Tuesday, 23 May 2006 17:24 PM
To: [email protected]
Subject: [cfaussie] Re: JRUN Servlet Error

 

1000+ files = lots of much whitespace / code generated = server memory overload = browser memory overload?

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]On Behalf Of Dale Fraser
Sent: Tuesday, 23 May 2006 5:03 PM
To: [email protected]
Subject: [cfaussie] JRUN Servlet Error

Hi,

 

I’m getting a weird error, the title of the page says

 

JRUN Servlet Error

 

And the body says in a big bold Font

 

500 null

 

When I run this on a subset of data it works find, so I figure it’s something to do with the 1000+ files I’m processing.

 

I can process all the files in smaller batches, ie 200 at a time.

 

Even more interesting, is when I try to view the source to see if there is anything else strange, IE crashes.

 

Any ideas, I’m off to try it in firefox.

 

Regards
Dale Fraser

 

 




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---

Reply via email to