954,585 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Large, Huge, Enormous Cfloop

Hi all,

i have a small email database (32k emails) and i want to create a newsletter system. Unofortunately the script where handles those 32k emails to send a html text times out as request exceed the default value and i dont wish to chagen that. I tried breaking the loop in 500 emails per page refresh but browser refuses to refresh to many times the same page...

Any suggestions?

zero_sequence
Newbie Poster
17 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 

That's too much for 1 page. Set it up as a scheduled task. Have the task pull 500 records. Process them, then have the task reschedule itself if there's more records to process.

arrgh
Posting Whiz
381 posts since Dec 2008
Reputation Points: 32
Solved Threads: 47
 

you can use a cfsetting tag to change the timeout for that page. Worth a shot.
http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-7d68.html

osekmedia
Newbie Poster
3 posts since Feb 2011
Reputation Points: 10
Solved Threads: 1
 

What's going to happen when the records increase to 35K, then 40K? Trying to do it all at once isn't scalable. The right way to do things is break the process into smaller batches.

arrgh
Posting Whiz
381 posts since Dec 2008
Reputation Points: 32
Solved Threads: 47
 

I agree with Arrgh.. I cant make the user wait for hours until the process is completed nor use too much cpu and memory for only one user.. So i quess re schedule would be a one way option here..

Thank you all for your time!

zero_sequence
Newbie Poster
17 posts since May 2008
Reputation Points: 10
Solved Threads: 0
 

This question has already been solved

Post: Markdown Syntax: Formatting Help
You