There is no functionality in Mach-II directly that would cause behavior like this. However, I do have a few questions:

1. What version of Mach-II are you using? Please report the full version number (something like 1.6.1.8 or 1.8.0.8 -- you can see it in the README file header or in the M2 Dashboard).

2. What vendor and version of you CFML engine are you using? (I'm guessing ti might be cf9...????)

3. Have you checked for var scope issues in your code?

4. Are you using cfthread anywhere?

5. <cfhttp> needs to have an "name" attribute which needs to be var'ed. It could be possible that there is a threading issue with the vendor/version of your CFML engine.

6. I think you need to share more code. I'd also log the user agent in the log message you are doing as well.

Bryan S said the following on 30/03/10 12:00:

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.configName#-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.cfhttpCompleteTime=#local.cfhttpCompleteTime#-local.configName=#local.configName#-local.desiredEvent=#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.

--
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.

Reply via email to