• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Scheduled tasks appear to be executing rwice in CF2021

Community Beginner ,
Oct 31, 2021 Oct 31, 2021

Copy link to clipboard

Copied

Howdy,

Recently migrated from CF2016 to CF2021- it seems to have gone relatively smoothly, except we have at least some scheduled tasks that appear to be firing twice.
This is a single standalone server.
New install of CF2021 on it.
No dev server running- this is it for now.
A check of the Task Manager appears to show only one instance of CF running.
scheduler.log shows the task firing only once ar a given time.
But the task code has a CFLOG at the top that writes to a separate log file, and it is chock full of lines like:

"Information","ajp-nio-127.0.0.1-8020-exec-188","10/30/21","13:30:00","APPName","Task Start- Check Interval Start: 2021-10-30T17:00:02  End: 2021-10-30T17:15:00"
"Information","ajp-nio-127.0.0.1-8020-exec-140","10/30/21","13:30:00","APPName","Task Start- Check Interval Start: 2021-10-30T17:00:02  End: 2021-10-30T17:15:00"

You can see the entries are the same except for the thread IDs, and the task is essentially run twice, with mayhem ensuing. Looking for any ideas to track this down. Either we misconfigured CF on the new server, or missed something with the scheduled task setup, but can't think what. This all ran fine on the old server, which was a co-lo shared box- the new server is on AWS, so there's no chance of crossover. I just checked and CF is not running on the old server.

Thanks for your help.

 

Views

155

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Beginner , Nov 01, 2021 Nov 01, 2021

Howdy,

 

Thanks for your response, Charlie. We talked a few months ago about CF2021 licensing. Your suggestion is a good one, and I'd normally give ir a go, but in the interim it appears that our DecOps guy decided to spin up a dev server by cloning the existing production server, with the result that tasks ran twice. This is AWS, so I'm still not clear why data from both servers were making it into the one log file we set up for the remplate, but disabling the services on the cloned server restor

...

Votes

Translate

Translate
Community Expert ,
Oct 31, 2021 Oct 31, 2021

Copy link to clipboard

Copied

When this happens to folks, the natural reaction is to feel there must be something wrong with CF, especially on a new version. But often there's a simpler explanation. 

 

I see your clarifications about the old server not possibly being the source of the other request. Still, since you ask for "any ideas", I'd suggest you modify the cflog line (which I assume is in the code called as a task) so that it outputs the cf variables cgi.remote_addr and cgi.http_user_agent. The former would be the ip of who made the request, while the latter is the kind of client making the call. They may be the same, but perhaps not.

 

Also, it's possible that your cf server is behind a load balancer or proxy that causes ALL requests to seem to come from the same ip address. There are various solutions and alternative steps to help if so. But for now, let's see what the above gets you.

 

I will add that if you had a cf monitor in place, like either the pmt fusionreactor, that could help with your challenge. I'll assume for now you have neither in place. 


/Charlie (troubleshooter, carehart.org)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Nov 01, 2021 Nov 01, 2021

Copy link to clipboard

Copied

Howdy,

 

Thanks for your response, Charlie. We talked a few months ago about CF2021 licensing. Your suggestion is a good one, and I'd normally give ir a go, but in the interim it appears that our DecOps guy decided to spin up a dev server by cloning the existing production server, with the result that tasks ran twice. This is AWS, so I'm still not clear why data from both servers were making it into the one log file we set up for the remplate, but disabling the services on the cloned server restored (more or less) normal operation.

But thanks very much for the quick response and suggesrion, that was a very useful idea.


Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 02, 2021 Nov 02, 2021

Copy link to clipboard

Copied

LATEST

Thanks for sharing your findings.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 01, 2021 Nov 01, 2021

Copy link to clipboard

Copied

It might be innocent. ColdFusion does itself write to log whenever a scheduled task runs. It just might be that your cflog code is duplicating what ColdFusion is doing. 

 

The test of this hypothesis is obvious. Temporarily comment out the cflog code and see what happens.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation