0

I am using CFTHREAD on ColdFusion 8.

Occasionally I find that all the threads stop executing and remain with STATUS=NOT_STARTED

The server monitor tells me that there are no running requests, no running threads and an increasing number of queued threads.

The only way to recover is to restart the ColdFusion instance.

I only use threads in a handful of places. Some of the calls to CFTHREAD are JOINED - in this case I terminate any threads which have not completed within the timeout. Some of the calls to CFTHREAD are fire and forget.

Does anyone know why this might be happening?

Thanks,

William Bibby

James A Mohler
  • 11,060
  • 15
  • 46
  • 72

1 Answers1

0

In one of my application I already faced thread hanging issue. That's because, my thread was running some HTTP call or huge file downloading procedure, it was facing connection timeout problem.

Due to this thread hanging our server also becomes very busy because resources acquired by the running thread can't be released.

My Solution: Just check from how much time the thread is running. If it more than a specific interval then I was killing the thread by code.

You can use ColdFusion Admin API to kill a thread. If you want how to kill a thread using admin API then see here

Roul
  • 945
  • 1
  • 12
  • 34
  • Thank you for the suggestion. However the Admin API tells me that there are no threads running and therefore no threads to kill. – user2987309 Nov 25 '13 at 10:44