I have a client who usually sends out approximately 20,000 emails per morning using a CF page. The page queries the companies, then loops thru them and finds all the employees for each company, then loops cfmail.
This has worked just fine until we added 20,000 more emails to a particular company. Now they are sending 40,000 from one company and a few from the rest in the loop. What's happening is the page eventually dies, even though all the emails go out. The mailing works for the first index, but the loop does not continue on to the other companies. This was working fine before we doubled the size.
I was thinking, could it be a cfquery timeout? From what i understand the cfquery timeout would extend the time it takes for an initial select statement (if there was a large recordset). There are only 4 records (companies). Would the timeout increase the length the recordset stays in CF memory.
What i think may be happening is in the following code below.
Does the cfsetting requesttimeout conflict with cfquery timeout? Is that in the right place?
Additionally, i looked in all the logs, CF Logs, IIS logs, and there are no entries that say anything specific about timeouts so i am completely baffled.
<cfquery name = findcompanies>
<!--- the first instance of this loop works and happens to also be the company with 40,000 emails. The loop does not continue, but does send out first. It takes 28 minutes or so for the first loop to occurr. Can the cfquery above be deleted in memory by they time the 2nd instance of this loop is created thereforre there's no recordset anymore for "findcompanies"
<cfset pagetimeoutvalue = "5000">
<cfsetting RequestTimeout = "#pagetimeoutvalue#">
<cfloop query = getcompanies>
DO ALL MAILING STUFF