Possibly break your task up over multiple requests ?
do you have a unique ID on the query you are returning ? if so, you can
do something like
<cfquery maxrows="#maxRowsPerRequest#" ......
SELECT *
from table
where id > #lastIDProcessed#
Then put a meta-refesh on the output of that schedule that reloads the
same page and processes the next X number of records.
so maybe you can do 100 or 1000 at a time. you will have to play with it
to see how long each request takes.
but im guessing the less data you process the less memory will get
chewed up. The meta-refresh will give the server time to garbage collect
from the last request and free up some memory.
Other than this technique, look at caching queries where you can and any
not re-creating COM objects or doing big queries within loops.
Pat
Duncan wrote:
Once a week we run a mailout to our clients over night. The entire
process is split over 2 tasks. One task matches clients to the
products matching their criteria and puts it in a db table. The second
task gets all those id's and retreives all the data for both client
and product, then puts the info into an email and sends it.
Our jrun4 and mx7 instance was having troubles with the set up part a
week or so ago and I increased our JVM heap to 1GB (on a 2.5 GB RAM
machine). This solved the issue no problems, and now it completes the
entire first stage. This is set to run for a max of 4 hours. We then
schedule the second part to start 4.5 hours after the first.
Even now with 1GB heap the second part is hitting20% complete and
dying from an out of memory.
Because its run at midnight - 4am, I cant run metrics on it (coz I am
in a sleepy place) so I dont know quite whats happening to GC but I am
a bit miffed it blows up.
Ideas:
The code is FB and straight procedural - would I be able to recycle
memory better with a CFC or 2?
Could my JVM be better tuned?
Anything I can do to slim down memory usage or tune JVM better? Thanks.
---
You are currently subscribed to cfaussie as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/