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

cfthread issue: Variable _cffunccfthread_cfact is undefined

Participant ,
Feb 18, 2009 Feb 18, 2009

Copy link to clipboard

Copied

I'm occasionally getting this error using the cfthread tag but don't know where to start to debug it. It doesn't always happen but a few times a day and sometime it spikes out my available memory. Can anyone point me in the right direction to tracking down this bug? I'm running the latest CF8 on Jrun.

Here is ths complete error:

1 "Error","cfthread-27","02/18/09","17:45:18",,"ThreadID8C35519B-C9E7-97E1-B91F-CE9A5082B3DC: Variable _cffunccfthread_cfact_InsertStatus2ecfm7047469871 is undefined. "

The "ThreadID8C35519B-C9E7-97E1-B91F-CE9A5082B3DC" is the name I gave to the thread using a GUID. The "InsertStatus2ecfm" part is the coldfusion template name.

Here are the exceptions building up to it:

1 "Error","cfthread-27","02/18/09","17:45:18",,"AUTOMATEDPROCESSID8C35519B-C9E7-97E1-B91F-CE9A5082B3DC: Variable _cffunccfthread_cfact_InsertStatus2ecfm7047469871 is undefined. "
2 coldfusion.runtime.UndefinedVariableException: Variable _cffunccfthread_cfact_InsertStatus2ecfm7047469871 is undefined.
3 at coldfusion.runtime.CfJspPage._get(CfJspPage.java:251)
4 at coldfusion.runtime.CfJspPage._get(CfJspPage.java:236)
5 at coldfusion.thread.Task.invokeFunction(Task.java:233)
6 at coldfusion.thread.Task.run(Task.java:141)
7 at coldfusion.scheduling.ThreadPool.run(ThreadPool.java:201)
8 at coldfusion.scheduling.WorkerThread.run(WorkerThread.java:71)
TOPICS
Advanced techniques

Views

1.9K

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 ,
Feb 19, 2009 Feb 19, 2009

Copy link to clipboard

Copied

I think it's better to show the code.

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
Explorer ,
Feb 19, 2009 Feb 19, 2009

Copy link to clipboard

Copied

This is the code in the InsertStatus.cfm template. It's not that complex:

<cfthread action="run" name="ThreadID#CreateGUID()#" Customer_UserID="#getCustomer.Customer_UserID#" LocationID="#getCustomer.LocationID#" Lead_StatusID="#getCustomer.Current_LeadStatusID#">
<cfmodule template="/index.cfm" fuseaction="Events.AutomatedProcess_Trigger" Customer_UserID="#Attributes.Customer_UserID#"
LocationID="#Attributes.LocationID#"
Lead_StatusID="#Attributes.Lead_StatusID#">
</cfthread>

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
Explorer ,
Feb 19, 2009 Feb 19, 2009

Copy link to clipboard

Copied

I've also tried placing try/catch around all the code and it does not catch the error, it only shows up in the exception & application log file in the cf administrator, so I don't think it's specifically code based. Although the module it calls is fairly complex and can take a minute or two to complete. This template also get called a lot.

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 ,
Feb 20, 2009 Feb 20, 2009

Copy link to clipboard

Copied

I'm not too sure about the way you introduce metadata into the cfthread tag. Couldn't you have done something like this?

<cfthread action="run" name="ThreadID#CreateGUID()#">
<cfmodule template="/index.cfm" fuseaction="Events.AutomatedProcess_Trigger" Customer_UserID="#getCustomer.Customer_UserID#"
LocationID="#getCustomer.LocationID#"
Lead_StatusID="#getCustomer.Lead_StatusID#">
</cfthread>

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
Participant ,
Feb 23, 2009 Feb 23, 2009

Copy link to clipboard

Copied

I've replace the cfthread tag with a call to an eventgateway with the same code and I no longer have the issue. I suspect it's down deeper in the core cfmx code than I want to go. I use cfthread in other places with no issue, it's just that this code is run often and can run for up to a minute, so I must have run into an issue there somewhere. I'm fine moving it to an eventgateway as it appears to like it there.

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 ,
Feb 23, 2009 Feb 23, 2009

Copy link to clipboard

Copied

I've replace the cfthread tag with a call to an eventgateway with the same code

Conceptually the same thing, really. Nice it now works.

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
Participant ,
Feb 24, 2009 Feb 24, 2009

Copy link to clipboard

Copied

I'd also like to give credit to FusionReactor and their server monitor tool. This tool let me track down the specific piece of code having the issue so I could focus on it specifically. I was having memory spikes but didn't know where they were happening untill I installed it and logged it happening.

Anyway, if anyone is having issues or just want to monitor their CFMX instances I'd suggest they give it a try. I find it handy for general site monitoring too.

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 ,
Feb 24, 2009 Feb 24, 2009

Copy link to clipboard

Copied

We shouldn't leave the impression here that there is an issue with cfthread. As far as I know, there are no issues with cfthread.

It is in fact one of the most welcome additions to Coldfusion. It is lighter than a CFML gateway and offers you more control. However, working with threads requires skill and caution.



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
New Here ,
Apr 22, 2013 Apr 22, 2013

Copy link to clipboard

Copied

LATEST

Hi, I've come across this same problem, but I cannot use event gateways as a fix.

It's one thread that causes the problem.

coldfusion.runtime.UndefinedVariableException: Variable _cffunccfthread_cfc8570911 is undefined.

It occurs after about 10 or 15 minutes of running the same test continously (about 600-800 runs). The threads (10 of them) are defined and run in a loop. Has anyone come across this issue before? I can't find anything else other than this topic online.

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