Skip to main content
Participant
August 2, 2012
Question

cfthread, valid use case? + queueing question

  • August 2, 2012
  • 1 reply
  • 487 views

Hello,

I am running cf9 standard

I setup a cfthread to start logging the different scopes.  ie.  form, url, session, cgi minus any sensitive form fields like password & credit card information.

I decided to use cfthread with priority low for this insertion since it is not crucial to the customer.

I read a lot of blog entries from around the time cfthread was introduced in CF8 where too many threads could be a bad thing.

I don't think I have to worry about it so much because they are just db inserts and I do not have the customer waiting around for the thread to finish.

Since last night there has been 20k+ db inserts with no issues so far.

Is there anything I need to be mindful of? It looks like the queueing system of cf9 is doing a good job of handling the cfthreads.

I guess I am on edge because of all the "be cautious" articles and want to make sure I am not leading the server down a road to disaster.


Randy

This topic has been closed for replies.

1 reply

Inspiring
August 2, 2012

I've had good and bad experiences with cfthread.  The bad ones all have something in common.  I was using cfthread to run simultaneous select queries against a redbrick database.  This caused problems with the database server, which is an old unix box.

On the other hand, I've used cfthread to run simulaneous queries against an oracle database and did not notice any issues.

Something that you may have already noticed is that when you use cfthread, queries in those threads do not show up in the debugging portion of the main thread.  That makes development and maintenance slightly more difficult.