I would really appreciate any help anyone can provide on this.
At CFTalk I've received extensive help on how to debug this problem but no
solution to the problem itself. I'm thinking it may be a Mach-II specific
problem. Based on the extensive logging I've added to my application, and
repeated testing, I am able to simplify it down to the following:
I have a scheduled task that runs an event I'll call checkIfReportShouldRun
that runs every minute.
At minute:
1) It determines that it should start a report and constructs a url
that calls the event runNextReportInQueue, logs the url that it constructed,
and fires that url
2) It determines that it should NOT fire an event and logs the fact
that it will not construct a url to run another report
3) Same as minute 2
4) Same as minute 2
5) Same as minute 2
HOWEVER, at minute 5 in spite of the fact that checkIfReportShouldRun
correctly determines that it should not start a report, a report does start.
This rogue report is started by the EXACT SAME url that fired at minute one.
I know this because when I have added a now() timestamp parameter to the url
to indicate when it is constructed in runNextReportInQueue and just before
checkIfReportShouldRun runs the url. I have included this code at the
bottom of this message.
This rogue report always fires exactly five minutes after the first report
fired. The second identical url DOES NOT fire IF the report that started at
minute 1 has completed, only if it is still running.
Although my application logging does not indicate that the duplicate url is
being fired the server logs do. This does not occur if I run
checkIfReportShouldRun manually in a browser. It does happen if
checkIfReportShouldRun is fired by a Cold Fusion Scheduled Task or by a
Linux Cron Job.
I have exhaustively ruled out the possibility that some other server is
firing either url. Logging shows conclusively that the line of code just
below <!---RUN THE URL---> in the code snippet at the bottom of this message
is causing both reports to start. How can this happen?
<cfset local.cfhttpStartTime
= now() />
<cfset local.desiredEvent =
local.desiredEvent & "&cfhttpStartTime=" & local.cfhttpStartTime />
<cfset local.logEntry =
"local.configNumber=#local.configNumber#-CFHTTP START
-local.cfhttpStartTime=#local.cfhttpStartTime#-local.configName=#local.confi
gName#-local.desiredEvent=#local.desiredEvent#CFHTTP START"/>
<cfset
logEntry("flexcomm-schedule-results","aa050-cfhttpLogging",local.logEntry)
/>
<!---RUN THE URL--->
<cfhttp method="get"
url="#local.desiredEvent#">
<cfset
local.cfhttpCompleteTime = now() />
<cfset local.desiredEvent =
local.desiredEvent & "&cfhttpCompleteTime=" & local.cfhttpCompleteTime />
<cfset local.logEntry =
"local.configNumber=#local.configNumber#-CFHTTP
COMPLETE-local.cfhttpStartTime=#local.cfhttpStartTime#-local.cfhttpCompleteT
ime=#local.cfhttpCompleteTime#-local.configName=#local.configName#-local.des
iredEvent=#local.desiredEvent#CFHTTP COMPLETE"/>
<cfset
logEntry("flexcomm-schedule-results","aa050-cfhttpLogging",local.logEntry)
/>
--
You received this message because you are subscribed to Mach-II for CFML list.
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/mach-ii-for-coldfusion?hl=en
SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/
Wiki / Documentation / Tickets:
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/
To unsubscribe from this group, send email to
mach-ii-for-coldfusion+unsubscribegooglegroups.com or reply to this email with
the words "REMOVE ME" as the subject.