1 Reply Latest reply on Nov 7, 2006 12:42 PM by ChrisVE

    Best Practices for Working With Large Result Sets?

      I'm using cfmail to send a multi-part message to approximately 10,000 recipients. CFMAIL loops over the list of recipients from a query. The problem is that as the template processes it keeps chewing up memory and at some point chews it all up and throws a 'jrun closed connection' error. It seems to max out around 800 emails before it bombs out.

      Is there a way to make the template release memory as it runs? Something like 'Send 500 emails, flush the memory, send 500 more emails, flush the memory...'

      I intend to add a couple more GB's of RAM to the server (there's 1GB now) but as our subscriber list grows I see the same problem occuring again in the future. Any advice would be appreciated.