Re: Can you use a CFTHREAD inside an Ajax routine?
I always just comment out the cfthread to single thread it and test there's no errors. On Monday, March 16, 2015, John Pullam wrote: > > The original answer that this does work was enough to get me headed in the > right direction. I eventually found a bug in my code; the CFTHREAD was > starting up the task correctly. > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360264 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Can you use a CFTHREAD inside an Ajax routine?
The original answer that this does work was enough to get me headed in the right direction. I eventually found a bug in my code; the CFTHREAD was starting up the task correctly. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360263 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Can you use a CFTHREAD inside an Ajax routine?
Steven, What is it that is telling you that the thread is not running? What is it supposed to do that it is not, manipulate the file system, execute a stored procedure? Is it supposed to return a value that you are not seeing? Remember that a function that initiates a thread will continue to run without waiting for the thread to finish unless a join action is performed. Dave -Original Message- From: Bobby [mailto:bo...@acoderslife.com] Sent: Thursday, March 12, 2015 10:49 AM To: cf-talk Subject: Re: Can you use a CFTHREAD inside an Ajax routine? When you say it doesn¹t generate any errors, do you mean that you¹ve looked through the exception logs? Unless you are trapping it with try/catch or a custom error handler, that¹s the only place you would discover that an error happened in a cfthread that you are spawning and forgetting. On 3/5/15, 3:47 PM, "John Pullam" wrote: > >It seems to me that the CFTHREAD I attempt to start from inside an Ajax >routine (triggered by a CFWINDOW) never runs and doesn't generate any >error message. Can anyone advise if this is a legitimate thing to do? > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360256 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Can you use a CFTHREAD inside an Ajax routine?
When you say it doesn¹t generate any errors, do you mean that you¹ve looked through the exception logs? Unless you are trapping it with try/catch or a custom error handler, that¹s the only place you would discover that an error happened in a cfthread that you are spawning and forgetting. On 3/5/15, 3:47 PM, "John Pullam" wrote: > >It seems to me that the CFTHREAD I attempt to start from inside an Ajax >routine (triggered by a CFWINDOW) never runs and doesn't generate any >error message. Can anyone advise if this is a legitimate thing to do? > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360243 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Can you use a CFTHREAD inside an Ajax routine?
Yes, this works. I do it for an application I'm working on. The ajax call hits a page with a cfthread and it runs fine. I do have problems when that cfthread calls other cfm/cfc pages that also have cfthread in them. When that happens I get an error. Steve -Original Message- From: John Pullam [mailto:jpul...@mcleansystems.com] Sent: Thursday, March 05, 2015 3:48 PM To: cf-talk Subject: Can you use a CFTHREAD inside an Ajax routine? It seems to me that the CFTHREAD I attempt to start from inside an Ajax routine (triggered by a CFWINDOW) never runs and doesn't generate any error message. Can anyone advise if this is a legitimate thing to do? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360206 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Can you use a CFTHREAD inside an Ajax routine?
It seems to me that the CFTHREAD I attempt to start from inside an Ajax routine (triggered by a CFWINDOW) never runs and doesn't generate any error message. Can anyone advise if this is a legitimate thing to do? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:360205 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFthread
> Let's say I declare a series of CFthreads on a single page. These will > process serially, not concurrently, right? Yes. > What if one fails? Do the subsequent threads die with it, or do they continue > to process > after the failed one craps out? Each thread is a separate program. The failure of one will not affect the others, unless they're accessing a shared resource which is blocked by the failed thread (which is generally unlikely). > And, is there a way to control/choose either of these behaviors? Not directly, but you can certainly do this sort of thing indirectly by writing monitoring code. There's an example of this in the last version of the Advanced ColdFusion course that we wrote for Adobe. In a nutshell, threads can sleep and wake up, expose their status, and you could read that status in another thread. You won't be able to tell that a thread has "failed", but you could tell that a thread is still busy, and make an assumption that a thread that's been busy for too long has failed. Dave Watts, CTO, Fig Leaf Software 1-202-527-9569 http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Service-Disabled Veteran-Owned Small Business (SDVOSB) on GSA Schedule, and provides the highest caliber vendor- authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359902 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CFthread
Let's say I declare a series of CFthreads on a single page. These will process serially, not concurrently, right? What if one fails? Do the subsequent threads die with it, or do they continue to process after the failed one craps out? And, is there a way to control/choose either of these behaviors? Thanks in advance, Les ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359901 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfthread execution slowdown
Dave Phelan wrote: > What I see is that the server load remains pretty consistent, > it's the number of requests completed that is dropping. Precisely, but in marked stages Dave Phelan wrote: > This could be an indication that the pages become more complex > as the process continues, or it may indicate that the faster > running threads are all completed leaving the longer running > threads at the end. Its neither I'm afraid. I have two jobs I am doing this in. One builds image pages for for-sale vehicles in a multiple listing service. Each listing can, at random, have one, two or dozens of images and thus dozens of pages needing to be built in its thread. Lots of variability there but I am not measuring thread completion rates. I'm watching the speed of the page requests, which should remain roughly constant over time. Each page is pretty much identical to the next in terms of CF load. All single-record key lookups. More telling: I have a separate job that creates the vehicle listing pages - the parent of the aforementioned image pages. This is always a 1-page thread/request, is always roughly the same job/load, and only 14,000-20,000 pages are made vs. 350,000-400,000. This smaller routine evidences the same staged decline in performance. The completion rates are different as the nature of the pages are different, but FusionReactor shows the same staged decline in output. Dave Phelan wrote: > My suggestion would be to do some time monitoring on the loops. > I think you'll find that the average completion time for each > thread increases as the number of completed requests decreases. I did that, and more on that in a bit, but I must be missing your point on rates. Thread completion time is going to be widely variable as one thread is spawned per vehicle listing, and each can have any number of images (from one to a couple hundred, averaging I believe around 40). What I am measuring however is the rate of page completion and that should - I would think - remain constant across the job unless some resource somewhere is hitting a limit. Loop monitoring: The original test code stored a db record at the start and stop of each loop completed. The 'stop' record gave me a count of how many pages were made and let me calc duration. That much db activity slowed things down so the job was slower than its single-threaded predecessor. In the end all it showed me was that things were slowing down proportionately, in stages, just like FusionReactor pointed out in its request list. > Is this apache or IIS? IIS 7.5 On Fri, Jul 26, 2013 at 12:05 PM, Mark A Kruger wrote: > > Is this apache or IIS? > > -Original Message- > From: Money Pit [mailto:websitema...@gmail.com] > Sent: Friday, July 26, 2013 11:41 AM > To: cf-talk > Subject: cfthread execution slowdown > > > I need another set of eyeballs on this. I can't see what I'm doing wrong. > > I'm building many thousands of static pages. I turned to cfthread to speed > things up. Each thread can output one page or more than one depending on > info retrieved. I use an array to manage the number of threads in use at > any one time. > > It works great, but I am seeing CF slow down - in fixed stages - throughout > the life of the process. Take a look at this image taken from > FusionReactor to see what I mean: > > http://205.210.189.205/images/screenshot081.jpg > > Its not a curve but rather three distinct stages of output. Stage 1 is > about 2900 pages per minute, Stage 2 is around 2400 and Stage 3 - where the > routine stabilizes - is about 1200. > > On a second server building differently-composed pages, I see exactly the > same thing. > > CF isn't bogging down from load... its flat out not working as hard. Its > as if it decided it didn't want to work as hard, so it eases off. Never > seen anything like it. > > Here's the code in a nutshell. Can anyone see something I am doing that is > causing this work slowdown? > > > > name="getData" > datasource="#variables.dsn#"> > [sql goes here] > > > condition="variables.loopCounter LT getData.recordCount"> > > > > > temp=arrayAppend(variables.threadArray,variables.thisThreadID)> > name="#variables.thisThreadID#" > action="run"> > > > temp=arrayDeleteAt(variables.threadArray,arrayFindNoCase(variables.threadArr > ay,variables.thisThreadID))> > > > > > > > -- > --m@Robertson-- > Janitor, The Robertson Team > mysecretbase.com > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356343 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfthread execution slowdown
Is this apache or IIS? -Original Message- From: Money Pit [mailto:websitema...@gmail.com] Sent: Friday, July 26, 2013 11:41 AM To: cf-talk Subject: cfthread execution slowdown I need another set of eyeballs on this. I can't see what I'm doing wrong. I'm building many thousands of static pages. I turned to cfthread to speed things up. Each thread can output one page or more than one depending on info retrieved. I use an array to manage the number of threads in use at any one time. It works great, but I am seeing CF slow down - in fixed stages - throughout the life of the process. Take a look at this image taken from FusionReactor to see what I mean: http://205.210.189.205/images/screenshot081.jpg Its not a curve but rather three distinct stages of output. Stage 1 is about 2900 pages per minute, Stage 2 is around 2400 and Stage 3 - where the routine stabilizes - is about 1200. On a second server building differently-composed pages, I see exactly the same thing. CF isn't bogging down from load... its flat out not working as hard. Its as if it decided it didn't want to work as hard, so it eases off. Never seen anything like it. Here's the code in a nutshell. Can anyone see something I am doing that is causing this work slowdown? [sql goes here] -- --m@Robertson-- Janitor, The Robertson Team mysecretbase.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356334 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: cfthread execution slowdown
What I see is that the server load remains pretty consistent, it's the number of requests completed that is dropping. This could be an indication that the pages become more complex as the process continues, or it may indicate that the faster running threads are all completed leaving the longer running threads at the end. My suggestion would be to do some time monitoring on the loops. I think you'll find that the average completion time for each thread increases as the number of completed requests decreases. David Phelan Web Developer IT Security & Web Technologies Emerging Health Montefiore Information Technology 3 Odell Plaza, Yonkers, NY 10701 914-457-6465 Office 862-234-9109 Cell dphe...@emerginghealthit.com www.emerginghealthit.com www.montefiore.org -Original Message- From: Money Pit [mailto:websitema...@gmail.com] Sent: Friday, July 26, 2013 12:41 PM To: cf-talk Subject: cfthread execution slowdown I need another set of eyeballs on this. I can't see what I'm doing wrong. I'm building many thousands of static pages. I turned to cfthread to speed things up. Each thread can output one page or more than one depending on info retrieved. I use an array to manage the number of threads in use at any one time. It works great, but I am seeing CF slow down - in fixed stages - throughout the life of the process. Take a look at this image taken from FusionReactor to see what I mean: http://205.210.189.205/images/screenshot081.jpg Its not a curve but rather three distinct stages of output. Stage 1 is about 2900 pages per minute, Stage 2 is around 2400 and Stage 3 - where the routine stabilizes - is about 1200. On a second server building differently-composed pages, I see exactly the same thing. CF isn't bogging down from load... its flat out not working as hard. Its as if it decided it didn't want to work as hard, so it eases off. Never seen anything like it. Here's the code in a nutshell. Can anyone see something I am doing that is causing this work slowdown? [sql goes here] -- --m@Robertson-- Janitor, The Robertson Team mysecretbase.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356333 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfthread execution slowdown
are the requests taking any longer to run during the slowdown ? If so, I would look at your database as a possible culprit. Maybe you have exceeded the max number of database threads and that is causing queues on the database, or there may be some other bottleneck because the database is busy with some other activity for some other apps. I am guessing you are probably using MySQL, in which case take a look at JetProfiler. On Fri, Jul 26, 2013 at 5:40 PM, Money Pit wrote: > > I need another set of eyeballs on this. I can't see what I'm doing wrong. > > I'm building many thousands of static pages. I turned to cfthread to speed > things up. Each thread can output one page or more than one depending on > info retrieved. I use an array to manage the number of threads in use at > any one time. > > It works great, but I am seeing CF slow down - in fixed stages - throughout > the life of the process. Take a look at this image taken from > FusionReactor to see what I mean: > > http://205.210.189.205/images/screenshot081.jpg > > Its not a curve but rather three distinct stages of output. Stage 1 is > about 2900 pages per minute, Stage 2 is around 2400 and Stage 3 - where the > routine stabilizes - is about 1200. > > On a second server building differently-composed pages, I see exactly the > same thing. > > CF isn't bogging down from load... its flat out not working as hard. Its > as if it decided it didn't want to work as hard, so it eases off. Never > seen anything like it. > > Here's the code in a nutshell. Can anyone see something I am doing that is > causing this work slowdown? > > > > name="getData" > datasource="#variables.dsn#"> > [sql goes here] > > > condition="variables.loopCounter LT getData.recordCount"> > > > > > temp=arrayAppend(variables.threadArray,variables.thisThreadID)> > name="#variables.thisThreadID#" > action="run"> > > > temp=arrayDeleteAt(variables.threadArray,arrayFindNoCase(variables.threadArray,variables.thisThreadID))> > > > > > > > -- > --m@Robertson-- > Janitor, The Robertson Team > mysecretbase.com > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356330 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cfthread execution slowdown
I need another set of eyeballs on this. I can't see what I'm doing wrong. I'm building many thousands of static pages. I turned to cfthread to speed things up. Each thread can output one page or more than one depending on info retrieved. I use an array to manage the number of threads in use at any one time. It works great, but I am seeing CF slow down - in fixed stages - throughout the life of the process. Take a look at this image taken from FusionReactor to see what I mean: http://205.210.189.205/images/screenshot081.jpg Its not a curve but rather three distinct stages of output. Stage 1 is about 2900 pages per minute, Stage 2 is around 2400 and Stage 3 - where the routine stabilizes - is about 1200. On a second server building differently-composed pages, I see exactly the same thing. CF isn't bogging down from load... its flat out not working as hard. Its as if it decided it didn't want to work as hard, so it eases off. Never seen anything like it. Here's the code in a nutshell. Can anyone see something I am doing that is causing this work slowdown? [sql goes here] -- --m@Robertson-- Janitor, The Robertson Team mysecretbase.com ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:356329 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Can we use cfthread to speed up multi-query report processes?
> Have been trying to reply via HoF but it won't go through so I'm trying this. Actually, your previous replies did go through. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355829 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Can we use cfthread to speed up multi-query report processes?
Have been trying to reply via HoF but it won't go through so I'm trying this. > - Obviously, the feasibility of either option is dependent > on the process and use cases themselves. Of course. We realize that. These are on demand processes. We continuously monitor, tweak, and tune database performance. We're looking for additional improvement elsewhere as well. Thanks Dave and Alan for your input! George ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355828 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Can we use cfthread to speed up multi-query report processes?
> - Obviously, the feasibility of either option is dependent > on the process and use cases themselves. Of course. We realize that. These are on demand processes. We continuously monitor, tweak, and tune database performance. We're looking for additional improvement elsewhere as well. Thanks Dave and Alan for your input! George ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355826 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Can we use cfthread to speed up multi-query report processes?
> - Obviously, the feasibility of either option is dependent > on the process and use cases themselves. Of course. We realize that. These are on demand processes. We continuously monitor, tweak, and tune database performance. We're looking for additional improvement elsewhere as well. Thanks Dave and Alan for your input! George ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355825 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Can we use cfthread to speed up multi-query report processes?
Also, keep in mind - and I'm speculating a bit here on your process - if you have just 6 individual queries that run in a single threaded, linear fashion and they take 6 minutes to execute, running them all concurrently may take just as long as it's sounds like your DB server may be taxed or these are really heavy queries. Again, speculating here - it could be that you might benefit from some other options: 1. Maybe some DB tuning or having a DBA look at the SQL being executed to speed them up. 2. Maybe this isn't meant to be an on-demand process - as Dave rightly suggested, you could either batch them in the back ground - on-demand or you schedule them outright and have them delivered when ready and only run them once a __ - Obviously, the feasibility of either option is dependent on the process and use cases themselves. HTH On Tue, May 21, 2013 at 7:10 AM, Dave Watts wrote: > > > We have processes that assemble reports from as many as 6 individual > queries. Currently the queries run sequentially so the > > related report cannot be assembled and displayed until after all queries > have completed. Users often have to wait several > > minutes for their report. They are not happy about that. > > > > We are considering trying cfthread to run queries concurrently and then > assemble and display the related report after the longest > > running query completes. > > > > Is this a viable use for cfthread or is it meant to be used for > unrelated processes? > > > > Is anyone using cfthread as described above? Have you seen noticeable > improvement in performance? Is the cost in complexity > > of the code worth the improvement in performance? > > Yes, that sort of parallel processing is a common use case for > CFTHREAD, and it will improve performance for that user's request. Of > course, it typically also means you can't process as many user > requests simultaneously - it's not magic - but if that's not a problem > then you should be all set. > > Alternatively, you could use a single CFTHREAD that does all the work, > and the user could do something else instead of waiting for the report > at all - for example, the CFTHREAD could generate an email with a link > to the report. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > http://training.figleaf.com/ > > Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on > GSA Schedule, and provides the highest caliber vendor-authorized > instruction at our training centers, online, or onsite. > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355814 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Can we use cfthread to speed up multi-query report processes?
> We have processes that assemble reports from as many as 6 individual queries. > Currently the queries run sequentially so the > related report cannot be assembled and displayed until after all queries have > completed. Users often have to wait several > minutes for their report. They are not happy about that. > > We are considering trying cfthread to run queries concurrently and then > assemble and display the related report after the longest > running query completes. > > Is this a viable use for cfthread or is it meant to be used for unrelated > processes? > > Is anyone using cfthread as described above? Have you seen noticeable > improvement in performance? Is the cost in complexity > of the code worth the improvement in performance? Yes, that sort of parallel processing is a common use case for CFTHREAD, and it will improve performance for that user's request. Of course, it typically also means you can't process as many user requests simultaneously - it's not magic - but if that's not a problem then you should be all set. Alternatively, you could use a single CFTHREAD that does all the work, and the user could do something else instead of waiting for the report at all - for example, the CFTHREAD could generate an email with a link to the report. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355808 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Can we use cfthread to speed up multi-query report processes?
Hello! We have processes that assemble reports from as many as 6 individual queries. Currently the queries run sequentially so the related report cannot be assembled and displayed until after all queries have completed. Users often have to wait several minutes for their report. They are not happy about that. We are considering trying cfthread to run queries concurrently and then assemble and display the related report after the longest running query completes. Is this a viable use for cfthread or is it meant to be used for unrelated processes? Is anyone using cfthread as described above? Have you seen noticeable improvement in performance? Is the cost in complexity of the code worth the improvement in performance? We're using CF9\10 Enterprise on Unix and Windows. Thanks! George ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:355807 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Using session sope in cfthread
Hi All, I read all different post online about session variables being used in cfthread but I am still confused with actually use session variables in cfthread or not. Let me explain what I am trying to achieve here. I have a session with different structure variables. I need to run thread1 and update/insert session.struct1, run thread2 and update/insert session.struct2, run thread3 and update/insert session.struct2. Do you think I should used cflock to write data to session. If yes does it slows down the process? Thanks in Advance... Ria. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348199 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfthread
Thanks all for help, I found two problems in my code. My thread name wasn't unique and I accidentally added cfthread inside cfthread which is not valid. >Also you will need to remember that there is a limit to how many threads can >run at the same time on CF Standard.. > >-- >Regards, >Andrew Scott >WebSite: http://www.andyscott.id.au/ >Google+: http://plus.google.com/108193156965451149543 > > >On Thu, Oct 13, 2011 at 1:40 PM, Ria Ragam wrote: ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348083 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfthread
> So is it not possible to run more than one thread from cfloop? Sure, it's possible. But you don't want to have more than one thread with the same name in the loop. You're dynamically naming some of your threads, but not "t10". Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348082 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfthread
You can do N threads, but I don't think you can reuse the same name. In your logic, you have threads being named like so: t1 t10 t2 t10 t3 t10 t4 t10 I don't think you intended that. On Wed, Oct 12, 2011 at 10:01 PM, Ria Ragam wrote: > > So is it not possible to run more than one thread from cfloop? > I have to run a set of threads in a loop.In that way I can change the values > on the thread attributes from the cfloop increment.Actually my cfloop is a > query. Every time I loop I need to create a set of threads.My cfloop query > recordcount is always more than 2. > Can I get around this? >>You have a thread called t10 in a loop. You probably want that outside the >>loop. >> >> >>> > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348081 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfthread
Also you will need to remember that there is a limit to how many threads can run at the same time on CF Standard.. -- Regards, Andrew Scott WebSite: http://www.andyscott.id.au/ Google+: http://plus.google.com/108193156965451149543 On Thu, Oct 13, 2011 at 1:40 PM, Ria Ragam wrote: > > Hi All, > > I am trying to implement something with cfthread but it throws with an > error "Child threads are not supported" > This is how its coded. > > > > > > > > > > I want all (here 4*2 = 8) threads need to be run simultaneously. Please let > me know what am I doing wrong here. How can "t10" thread be a child thread? > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348080 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfthread
So is it not possible to run more than one thread from cfloop? I have to run a set of threads in a loop.In that way I can change the values on the thread attributes from the cfloop increment.Actually my cfloop is a query. Every time I loop I need to create a set of threads.My cfloop query recordcount is always more than 2. Can I get around this? >You have a thread called t10 in a loop. You probably want that outside the >loop. > > >> ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348079 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: cfthread
You have a thread called t10 in a loop. You probably want that outside the loop. On Wed, Oct 12, 2011 at 9:40 PM, Ria Ragam wrote: > > Hi All, > > I am trying to implement something with cfthread but it throws with an error > "Child threads are not supported" > This is how its coded. > > > > > > > > > > I want all (here 4*2 = 8) threads need to be run simultaneously. Please let > me know what am I doing wrong here. How can "t10" thread be a child thread? > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348078 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
cfthread
Hi All, I am trying to implement something with cfthread but it throws with an error "Child threads are not supported" This is how its coded. I want all (here 4*2 = 8) threads need to be run simultaneously. Please let me know what am I doing wrong here. How can "t10" thread be a child thread? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:348075 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFThread Memory Issues sending emails
Thanks very much for this great response. I'm going to look at implementing the idea you had for sending things out in batches. I've got another big send to do this week so we'll see how it goes! > -Original Message- > From: Bobby Hartsfield [mailto:bo...@acoderslife.com] > Sent: 21 May 2011 14:25 > To: cf-talk > Subject: RE: CFThread Memory Issues sending emails > > > For a quick fix, I'd split those up into smaller batches. For instance, your > cfthread could process 1000 emails (or whatever number you decide is > manageable by your configuration) id make the count a parameter that is > easily passed in via URL so all you'd have to do is change the url var in a > scheduled task to increase/decrease the count. > > Then the thread's process would be something like... > > 1) Grab top X records that need to be sent. > 2) Send the emails for those top X records > 3) Update those records to indicate that they have been processed so they > arent grabbed again by step 1. > 4) Stop. > > Then just schedule it to run every minute or so. > > If you use timestamps as your step 3 indicator, you still have the start and > stop times once there are no emails left to send. > > > For a more elaborate solution, id queue individual emails up into a DB table > and have multiple threads process them one at a time until they were done > (makeshift CF message queue). > > I've found that letting a thread process 100s of thousands of small items > individually makes that thread much happier than if it had to process even a > fraction of that amount all at once. > > That said, I would have to agree and think your described setup should have > zero problem with sending that many emails in a single loop. > > Have you monitored CF to see how the thread was doing? Maybe watch > jconsole memory stats as the thread is running to see if it is indeed climbing > rapidly and causing the GC? > > Maybe the thread is being spawned more than once? Maybe you could try > loading all of the used variables into a single struct within that thread so you > can clear that struct at the end of the loop? > > I'm just throwing out ideas here... > > > .:.:.:.:.:.:.:.:.:.:.:.:.:. > Bobby Hartsfield > http://acoderslife.com > http://cf4em.com > > > > -Original Message- > From: Firewall [mailto:firew...@cc.uk.com] > Sent: Thursday, May 19, 2011 7:38 AM > To: cf-talk > Subject: CFThread Memory Issues sending emails > > > This one has me really stumped. I'm running a pretty simple cfmail script to > send out email messages to a user list. Up until now I was simply doing it > with a browser reload but the client recently doubled the number of emails > they want to send to about 57,000. So I decided to implement this with > cfthread wrapped around my loop containing the cfquery and cfmail code. > The > idea being that the server simply returns the page to the browser and kicks > of a massive send job in the background. Once the mail script completes an > email is send to the user saying " I sent your email to X people, I started > at xx:xx and finished at xx:xx" > > My testing worked perfectly and the client used it on smaller email jobs > without a problem, I tried it for the first time yesterday on the main > massive list and about a third of the messages were sent out before the > server seemed to hang. Looking at the logs I saw loads of JVM errors > referring to "GC" aka the garbage collector. > The specific log entry was: "java.lang.OutOfMemoryError: GC overhead limit > exceeded" > > The server seems to have no problems sending about 10-15k emails using > this > process but when I try it on this one big list it results in all kinds of > problems so I'm wondering if this is an issue with cfthread, JVM, CF 8.0.1 > or my code. > > I'm wondering if this anyone else has tried to do this and seen the same > problem; and if so how did you go about solving it? > > My setup is Coldfusion 8.0.1 (64bit) running on Red Hat Enterprise 5, the > server itself is a nearly new core i7 Dell PowerEdge with Raid SSD hard > drives and 12Gb RAM; in other words it should look at 57k emails and just > laugh at the smallness of the list :) > > I've included the outline of my send code just in case someone spots > something really stupid in my code: > > > > > > > Grab info to send in email > > > > > > > Grab user details based on ID contained in "e" > > > > >
RE: CFThread Memory Issues sending emails
For a quick fix, I'd split those up into smaller batches. For instance, your cfthread could process 1000 emails (or whatever number you decide is manageable by your configuration) id make the count a parameter that is easily passed in via URL so all you'd have to do is change the url var in a scheduled task to increase/decrease the count. Then the thread's process would be something like... 1) Grab top X records that need to be sent. 2) Send the emails for those top X records 3) Update those records to indicate that they have been processed so they arent grabbed again by step 1. 4) Stop. Then just schedule it to run every minute or so. If you use timestamps as your step 3 indicator, you still have the start and stop times once there are no emails left to send. For a more elaborate solution, id queue individual emails up into a DB table and have multiple threads process them one at a time until they were done (makeshift CF message queue). I've found that letting a thread process 100s of thousands of small items individually makes that thread much happier than if it had to process even a fraction of that amount all at once. That said, I would have to agree and think your described setup should have zero problem with sending that many emails in a single loop. Have you monitored CF to see how the thread was doing? Maybe watch jconsole memory stats as the thread is running to see if it is indeed climbing rapidly and causing the GC? Maybe the thread is being spawned more than once? Maybe you could try loading all of the used variables into a single struct within that thread so you can clear that struct at the end of the loop? I'm just throwing out ideas here... .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com http://cf4em.com -Original Message- From: Firewall [mailto:firew...@cc.uk.com] Sent: Thursday, May 19, 2011 7:38 AM To: cf-talk Subject: CFThread Memory Issues sending emails This one has me really stumped. I'm running a pretty simple cfmail script to send out email messages to a user list. Up until now I was simply doing it with a browser reload but the client recently doubled the number of emails they want to send to about 57,000. So I decided to implement this with cfthread wrapped around my loop containing the cfquery and cfmail code. The idea being that the server simply returns the page to the browser and kicks of a massive send job in the background. Once the mail script completes an email is send to the user saying " I sent your email to X people, I started at xx:xx and finished at xx:xx" My testing worked perfectly and the client used it on smaller email jobs without a problem, I tried it for the first time yesterday on the main massive list and about a third of the messages were sent out before the server seemed to hang. Looking at the logs I saw loads of JVM errors referring to "GC" aka the garbage collector. The specific log entry was: "java.lang.OutOfMemoryError: GC overhead limit exceeded" The server seems to have no problems sending about 10-15k emails using this process but when I try it on this one big list it results in all kinds of problems so I'm wondering if this is an issue with cfthread, JVM, CF 8.0.1 or my code. I'm wondering if this anyone else has tried to do this and seen the same problem; and if so how did you go about solving it? My setup is Coldfusion 8.0.1 (64bit) running on Red Hat Enterprise 5, the server itself is a nearly new core i7 Dell PowerEdge with Raid SSD hard drives and 12Gb RAM; in other words it should look at 57k emails and just laugh at the smallness of the list :) I've included the outline of my send code just in case someone spots something really stupid in my code: Grab info to send in email Grab user details based on ID contained in "e" Failed send: #gu.email# - #cfcatch.message# #gn.msgSubj# sent to #listlen(Form.sendToList)# people Started: #startingTime# Finished: #endingTime# best wishes, -= Ed Edward Chanter Technical Innovations Manager Collaborative Connections Ltd. http://www.cc.uk.com/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http:/
RE: CFThread Memory Issues sending emails
Here's a question for the gurus; if I split a 50k mass email into chunks of 10k could I thread each chunk and have 5 threads running simultaneously sending 10k emails each? Has anyone tried this? > -Original Message- > From: Edward Chanter [mailto:firew...@cc.uk.com] > Sent: 20 May 2011 09:10 > To: cf-talk > Subject: RE: CFThread Memory Issues sending emails > > > Sounds about right, I'm currently working on a way to have things split into > chunks of 10k :) > > Thanks anyway! > > > -Original Message- > > I've found that all sends of email to large lists has to be done in > batches. > > CFMail doesn't really handle massive lists very well. > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344742 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFThread Memory Issues sending emails
Sounds about right, I'm currently working on a way to have things split into chunks of 10k :) Thanks anyway! > -Original Message- > I've found that all sends of email to large lists has to be done in batches. > CFMail doesn't really handle massive lists very well. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344741 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread Memory Issues sending emails
I've found that all sends of email to large lists has to be done in batches. CFMail doesn't really handle massive lists very well. On Thu, May 19, 2011 at 4:38 AM, Firewall wrote: > > The server seems to have no problems sending about 10-15k emails using this > process but when I try it on this one big list it results in all kinds of > problems so I'm wondering if this is an issue with cfthread, JVM, CF 8.0.1 > or my code. > > I'm wondering if this anyone else has tried to do this and seen the same > problem; and if so how did you go about solving it? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344733 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CFThread Memory Issues sending emails
This one has me really stumped. I'm running a pretty simple cfmail script to send out email messages to a user list. Up until now I was simply doing it with a browser reload but the client recently doubled the number of emails they want to send to about 57,000. So I decided to implement this with cfthread wrapped around my loop containing the cfquery and cfmail code. The idea being that the server simply returns the page to the browser and kicks of a massive send job in the background. Once the mail script completes an email is send to the user saying " I sent your email to X people, I started at xx:xx and finished at xx:xx" My testing worked perfectly and the client used it on smaller email jobs without a problem, I tried it for the first time yesterday on the main massive list and about a third of the messages were sent out before the server seemed to hang. Looking at the logs I saw loads of JVM errors referring to "GC" aka the garbage collector. The specific log entry was: "java.lang.OutOfMemoryError: GC overhead limit exceeded" The server seems to have no problems sending about 10-15k emails using this process but when I try it on this one big list it results in all kinds of problems so I'm wondering if this is an issue with cfthread, JVM, CF 8.0.1 or my code. I'm wondering if this anyone else has tried to do this and seen the same problem; and if so how did you go about solving it? My setup is Coldfusion 8.0.1 (64bit) running on Red Hat Enterprise 5, the server itself is a nearly new core i7 Dell PowerEdge with Raid SSD hard drives and 12Gb RAM; in other words it should look at 57k emails and just laugh at the smallness of the list :) I've included the outline of my send code just in case someone spots something really stupid in my code: Grab info to send in email Grab user details based on ID contained in "e" Failed send: #gu.email# - #cfcatch.message# #gn.msgSubj# sent to #listlen(Form.sendToList)# people Started: #startingTime# Finished: #endingTime# best wishes, -= Ed Edward Chanter Technical Innovations Manager Collaborative Connections Ltd. http://www.cc.uk.com/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344644 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Using CFTHREAD on CF PRO
Instead of going the route of using cfthread, I would suggest that you might looking into using a queue to handle this. There are a lot of queue options out there ( I believe that Railo uses ActiveMQ for a bunch of things internally, don't know about Adobe) but the essential idea is that you push a message onto the queue at the end of your request (onRequestEnd) and then you have an asynchronous worker process that monitors the queue, pulls messages off as they show up and then processes them. If you start seeing a big spike in traffic and need to pull the messages off the queue more quickly, you can increase the number of workers. If time isn't a particularly big issue, you can just let the one worker go and the messages will all be dealt with eventually. Cheers, Judah On Tue, May 17, 2011 at 7:56 AM, Brook Davies wrote: > > Hi Guys, > > > > I am considering spawning a new thread via the onRequestEnd event to do some > post processing. Basically its going to record some stats (a couple quick DB > queries) and possibly send an email based on some criteria. I am considering > CFTHREAD because the user does not need to wait for any results of this > processing. > > > > I've read some things about CFTHREAD being a bottle neck and that CF > Proffesional has limited threads. Would I be asking for trouble trying to do > this? Should I just let the user wait for the processing to finish? It would > really like only be 100-200 milliseconds or so > > > > Brook > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344618 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Using CFTHREAD on CF PRO
Although what Dan is saying is correct, one can think a little about this. Let's say we have a hundred requests come in at the same time, and for arguments sake we have a limitation of 2 running threads for ColdFusion standard. This means that you have 98 queued up ready to be processed, 49 to the power of 200ms which is 2401ms. That is almost 3 secs to process the threads. That might not be anything to worry about for a very low impact site, so you will need to take this into consideration with whatever method you decided. Personally with this type of restriction on ColdFusion Standard I would be more inclined to waste the 200ms on the user request, rather than bogging the server down for scalability reasons. Just something to think about. Regards, Andrew Scott http://www.andyscott.id.au/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344610 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Using CFTHREAD on CF PRO
Brook, On Tue, May 17, 2011 at 10:56 AM, Brook Davies wrote: > I am considering spawning a new thread via the onRequestEnd event to do > some > post processing. Basically its going to record some stats (a couple quick > DB > queries) and possibly send an email based on some criteria. I am > considering > CFTHREAD because the user does not need to wait for any results of this > processing. > > I've read some things about CFTHREAD being a bottle neck and that CF > Proffesional has limited threads. Would I be asking for trouble trying to > do > this? Should I just let the user wait for the processing to finish? It > would > really like only be 100-200 milliseconds or so > This is really one of those situations where running a load test really gives you the best answer. You may end up getting a variety of answers, but none will be quite as useful as spending 30-60 minutes running a simple load test to see what happens. If you don't currently have any tools for running a load test, download Apache jMeter <http://jakarta.apache.org/jmeter/> and then you can follow this tutorial: http://www.roseindia.net/jmeter/using-jmeter.shtml Set up a simple test what the results are between using and not using it in your onRequestEnd and see what the impact is on your site under various types of load. If you set up the Aggregate Report listener it'll give you an idea of the overall impact. I use jMeter a lot when I want to quickly see what the real impact of under load of some code might be. I usually will set things up so that a URL parameter can toggle various code branches--that way I can quickly change the behavior right from jMeter. I'll run several tests simulate heavy load and see which performs better overall and to see if any of the solutions are causing weird queuing issues. -Dan -- Dan G. Switzer, II dswit...@pengoworks.com http://blog.pengoworks.com/ âââââââ ââ âââââ âââââââ â âââ â âââââ ââ â âââ â â âââ â ââ â âââ â âââ â âââââââ âââ â â â âââââââ ââââââââ âââââ âââââ âââ ââââââââââââââ âââââ ââ ââââââââââââââ âââââ ââââ ââ ââ â ââââââââ âââââââ ââ ââ â ââ âââ ââââââââ â âââââââ âââ âââââ â âââââ â âââ â âââ ââ ââââââ ââ â âââ â â ââ ââ âââ âââ â âââââââ ââ ââ ââ â ââ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344576 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: Using CFTHREAD on CF PRO
If it is only going to be at max 1/5 of a second I don't see a thread making any difference to overall page processing time. You will end up adding more depending on concurrent connections, by using the cfhthread on standard edition of ColdFusion. As each thread will be queued up for each connection, so a user could end up waiting 5 seconds in the queue. Regards, Andrew Scott http://www.andyscott.id.au/ ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344570 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Using CFTHREAD on CF PRO
Hi Guys, I am considering spawning a new thread via the onRequestEnd event to do some post processing. Basically its going to record some stats (a couple quick DB queries) and possibly send an email based on some criteria. I am considering CFTHREAD because the user does not need to wait for any results of this processing. I've read some things about CFTHREAD being a bottle neck and that CF Proffesional has limited threads. Would I be asking for trouble trying to do this? Should I just let the user wait for the processing to finish? It would really like only be 100-200 milliseconds or so Brook ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344569 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFTHREAD inside a CFC Method, question about arguments
It was a question of which scope is the recommend scope to use and/or if there is a better way to pass the argumentCollection... -Original Message- From: Brook Davies [mailto:cft...@logiforms.com] Sent: February-03-11 3:10 PM To: cf-talk Subject: RE: CFTHREAD inside a CFC Method, question about arguments That's good enough for me Bobby :) Just haven't used cfthread much and wasn't sure if this was the correct syntax . Thanks :) -Original Message- From: Bobby Hartsfield [mailto:bo...@acoderslife.com] Sent: February-03-11 2:49 PM To: cf-talk Subject: RE: CFTHREAD inside a CFC Method, question about arguments Is that a question of preferred scope (id think attributes would be the only one that worked but would have to test that) or is it a question of passing in multiple arguments or a collection? I'd think what you have is perfectly acceptable. .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Brook Davies [mailto:cft...@logiforms.com] Sent: Thursday, February 03, 2011 1:45 PM To: cf-talk Subject: CFTHREAD inside a CFC Method, question about arguments Hello, I have a quick question about using CFthread inside a CFC. Inside my CFC I was to call another CFC method and pass it some of the arguments. Is the correct way to do this below. Do I need to pass in each argument scoped variable from the calling method and then refer to it in the attributes scope? This DOES work, but is it the best/correct way of doing it? Brook D. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341856 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFTHREAD inside a CFC Method, question about arguments
That's good enough for me Bobby :) Just haven't used cfthread much and wasn't sure if this was the correct syntax . Thanks :) -Original Message- From: Bobby Hartsfield [mailto:bo...@acoderslife.com] Sent: February-03-11 2:49 PM To: cf-talk Subject: RE: CFTHREAD inside a CFC Method, question about arguments Is that a question of preferred scope (id think attributes would be the only one that worked but would have to test that) or is it a question of passing in multiple arguments or a collection? I'd think what you have is perfectly acceptable. .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Brook Davies [mailto:cft...@logiforms.com] Sent: Thursday, February 03, 2011 1:45 PM To: cf-talk Subject: CFTHREAD inside a CFC Method, question about arguments Hello, I have a quick question about using CFthread inside a CFC. Inside my CFC I was to call another CFC method and pass it some of the arguments. Is the correct way to do this below. Do I need to pass in each argument scoped variable from the calling method and then refer to it in the attributes scope? This DOES work, but is it the best/correct way of doing it? Brook D. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341855 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFTHREAD inside a CFC Method, question about arguments
Is that a question of preferred scope (id think attributes would be the only one that worked but would have to test that) or is it a question of passing in multiple arguments or a collection? I'd think what you have is perfectly acceptable. .:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com -Original Message- From: Brook Davies [mailto:cft...@logiforms.com] Sent: Thursday, February 03, 2011 1:45 PM To: cf-talk Subject: CFTHREAD inside a CFC Method, question about arguments Hello, I have a quick question about using CFthread inside a CFC. Inside my CFC I was to call another CFC method and pass it some of the arguments. Is the correct way to do this below. Do I need to pass in each argument scoped variable from the calling method and then refer to it in the attributes scope? This DOES work, but is it the best/correct way of doing it? Brook D. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341854 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CFTHREAD inside a CFC Method, question about arguments
Hello, I have a quick question about using CFthread inside a CFC. Inside my CFC I was to call another CFC method and pass it some of the arguments. Is the correct way to do this below. Do I need to pass in each argument scoped variable from the calling method and then refer to it in the attributes scope? This DOES work, but is it the best/correct way of doing it? Brook D. ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:341842 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread - Am I using it correctly?
Mark, Thanks so much. This worked a treat. I also jacked up the cfthread limit in the admin and now the app is literally buzzing along. On Thu, Dec 16, 2010 at 7:47 AM, Mark A. Kruger wrote: > > Michael, > > You might also need to pass in "pos" - or of course you could simply pass > in > the URL and full file path and simplify the stuff you are passing back and > forth.. > > Mark A. Kruger, MCSE, CFG > (402) 408-3733 ext 105 > Skype: markakruger > www.cfwebtools.com > www.coldfusionmuse.com > www.necfug.com > > > > -Original Message- > From: Mark A. Kruger [mailto:mkru...@cfwebtools.com] > Sent: Thursday, December 16, 2010 6:38 AM > To: cf-talk > Subject: RE: CFThread - Am I using it correctly? > > > Michael, > > I think you need to pass your filename and dStruct into the thread as > arguments... as in > > dStruct="#dStruct#"> > path="#ExpandPath('./')#/parsed/" file="#fileName#" /> > > > Off the top of my head that's what I remember... that arguments need to be > passed in as attributes to get into the scope. > > -Mark > > > > > -Original Message- > From: Michael Grant [mailto:mgr...@modus.bz] > Sent: Wednesday, December 15, 2010 10:08 PM > To: cf-talk > Subject: CFThread - Am I using it correctly? > > > I have some older code that gets remote content. I wanted to add the use of > cfthread to allow the app to run other processes while it's pulling larger > files. However once I wrap it in thread tags it stops actually pulling the > files. It doesn't throw an error or act any differently except that they > code executes much faster since it doens't appear to actually be pulling > anything. > > This works: > path="#ExpandPath('./')#/parsed/" file="#fileName#" /> > > This doesn't: > > > path="#ExpandPath('./')#/parsed/" file="#fileName#" /> > > > Am I missing something? > > > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340100 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread - Am I using it correctly?
AH! Thanks Mark. I'll try that as soon as I can. It might be a couple of days before i can get back to it but I'm really excited to get this to work. I know I'm a little behind the times but better late than never I guess. On Thu, Dec 16, 2010 at 7:38 AM, Mark A. Kruger wrote: > > Michael, > > I think you need to pass your filename and dStruct into the thread as > arguments... as in > > dStruct="#dStruct#"> > path="#ExpandPath('./')#/parsed/" file="#fileName#" /> > > > Off the top of my head that's what I remember... that arguments need to be > passed in as attributes to get into the scope. > > -Mark > > > > > -Original Message- > From: Michael Grant [mailto:mgr...@modus.bz] > Sent: Wednesday, December 15, 2010 10:08 PM > To: cf-talk > Subject: CFThread - Am I using it correctly? > > > I have some older code that gets remote content. I wanted to add the use of > cfthread to allow the app to run other processes while it's pulling larger > files. However once I wrap it in thread tags it stops actually pulling the > files. It doesn't throw an error or act any differently except that they > code executes much faster since it doens't appear to actually be pulling > anything. > > This works: > path="#ExpandPath('./')#/parsed/" file="#fileName#" /> > > This doesn't: > > > path="#ExpandPath('./')#/parsed/" file="#fileName#" /> > > > Am I missing something? > > > > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340094 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFThread - Am I using it correctly?
Michael, You might also need to pass in "pos" - or of course you could simply pass in the URL and full file path and simplify the stuff you are passing back and forth.. Mark A. Kruger, MCSE, CFG (402) 408-3733 ext 105 Skype: markakruger www.cfwebtools.com www.coldfusionmuse.com www.necfug.com -Original Message- From: Mark A. Kruger [mailto:mkru...@cfwebtools.com] Sent: Thursday, December 16, 2010 6:38 AM To: cf-talk Subject: RE: CFThread - Am I using it correctly? Michael, I think you need to pass your filename and dStruct into the thread as arguments... as in Off the top of my head that's what I remember... that arguments need to be passed in as attributes to get into the scope. -Mark -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Wednesday, December 15, 2010 10:08 PM To: cf-talk Subject: CFThread - Am I using it correctly? I have some older code that gets remote content. I wanted to add the use of cfthread to allow the app to run other processes while it's pulling larger files. However once I wrap it in thread tags it stops actually pulling the files. It doesn't throw an error or act any differently except that they code executes much faster since it doens't appear to actually be pulling anything. This works: This doesn't: Am I missing something? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340093 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFThread - Am I using it correctly?
Michael, I think you need to pass your filename and dStruct into the thread as arguments... as in Off the top of my head that's what I remember... that arguments need to be passed in as attributes to get into the scope. -Mark -Original Message- From: Michael Grant [mailto:mgr...@modus.bz] Sent: Wednesday, December 15, 2010 10:08 PM To: cf-talk Subject: CFThread - Am I using it correctly? I have some older code that gets remote content. I wanted to add the use of cfthread to allow the app to run other processes while it's pulling larger files. However once I wrap it in thread tags it stops actually pulling the files. It doesn't throw an error or act any differently except that they code executes much faster since it doens't appear to actually be pulling anything. This works: This doesn't: Am I missing something? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340092 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread - Am I using it correctly?
I should mention this code is inside a cfc with a remote access type that I'm calling from a .cfm in the same directory. Don't know if any of that matters. On Wed, Dec 15, 2010 at 11:08 PM, Michael Grant wrote: > I have some older code that gets remote content. I wanted to add the use of > cfthread to allow the app to run other processes while it's pulling larger > files. However once I wrap it in thread tags it stops actually pulling the > files. It doesn't throw an error or act any differently except that they > code executes much faster since it doens't appear to actually be pulling > anything. > > This works: > path="#ExpandPath('./')#/parsed/" file="#fileName#" /> > > This doesn't: > > > path="#ExpandPath('./')#/parsed/" file="#fileName#" /> > > > Am I missing something? > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340091 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CFThread - Am I using it correctly?
I have some older code that gets remote content. I wanted to add the use of cfthread to allow the app to run other processes while it's pulling larger files. However once I wrap it in thread tags it stops actually pulling the files. It doesn't throw an error or act any differently except that they code executes much faster since it doens't appear to actually be pulling anything. This works: This doesn't: Am I missing something? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:340090 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFDUMP not allowed in CFTHREAD in 9 - allowed in 8
Can this be becuase of change in cfdump output structure from CF8 to CF9? And the application depending on the same? ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336851 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFDUMP not allowed in CFTHREAD in 9 - allowed in 8
I'm not seeing any issue with it: This works fine for me, On Tue, Sep 7, 2010 at 4:27 AM, Stephen Cassady wrote: > > This was new, just migrated some applications from an 8 to a 9 server. Part > of our code started to fail. We have a process that uses CFDUMP and mails us > the result as we run a process. The process sits inside of a CFTHREAD. > > This works in 8, it fails in 9. Remove the CFTHREAD, the code works - or > remove the CFDUMP and the code works. But have CFTHREAD with CFDUMP inside > will fail. > > Is this a reported bug? I couldn't find anything, and it was strange to see > this happen moving from 8 to 9. Could this be related to the reduction in > allowable CFTHREADS run concurrently from 8 to 9 - does the CFDUMP inside a > CFTHREAD somehow count as additional threads being run - and because it's in > the CFTHREAD it just fails because it can not que a "thread in a thread" > (grasping fro staws here, but trying to figure this out). > > Stephen > > ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336850 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CFDUMP not allowed in CFTHREAD in 9 - allowed in 8
This was new, just migrated some applications from an 8 to a 9 server. Part of our code started to fail. We have a process that uses CFDUMP and mails us the result as we run a process. The process sits inside of a CFTHREAD. This works in 8, it fails in 9. Remove the CFTHREAD, the code works - or remove the CFDUMP and the code works. But have CFTHREAD with CFDUMP inside will fail. Is this a reported bug? I couldn't find anything, and it was strange to see this happen moving from 8 to 9. Could this be related to the reduction in allowable CFTHREADS run concurrently from 8 to 9 - does the CFDUMP inside a CFTHREAD somehow count as additional threads being run - and because it's in the CFTHREAD it just fails because it can not que a "thread in a thread" (grasping fro staws here, but trying to figure this out). Stephen ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:336847 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFThread limitations with CF9 Standard vs Enterprise
Thanks for clarifying! Rick -Original Message- From: Judah McAuley [mailto:ju...@wiredotter.com] Sent: Thursday, March 25, 2010 3:31 PM To: cf-talk Subject: Re: CFThread limitations with CF9 Standard vs Enterprise The limitation is when you are using cfthread in your code. Tasks run in the scheduler don't count toward the limit, nor does cfhttp. Cheers, Judah On Thu, Mar 25, 2010 at 11:25 AM, Rick Faircloth wrote: > > I think I'm running at least 7 simultaneous threads at times on CF9 dev > using scheduled tasks. The code inside a thread only processes > once a previously-running thread completes, but the thread names > still show up in the CF Monitor... > > ??? > > > > -Original Message- > From: Judah McAuley [mailto:ju...@wiredotter.com] > Sent: Thursday, March 25, 2010 1:44 PM > To: cf-talk > Subject: Re: CFThread limitations with CF9 Standard vs Enterprise > > > Wow, that is a big change. The limit is 10 in CF8 standard. I'm sure > glad I haven't upgraded my production app to CF9 and going the Railo > route instead for thread happiness. I just wanted to get past the 10 > thread limitation, never expected it to drop down to 2. > > Cheers, > Judah > > On Thu, Mar 25, 2010 at 9:23 AM, James Holmes > wrote: >> >> "CFTHREAD is limited to two additional spawned threads in Standard > edition." >> >> > http://www.adobe.com/products/coldfusion/pdfs/cf9_feature_comparison_matrix_ > ue.pdf >> >> mxAjax / CFAjax docs and other useful articles: >> http://www.bifrost.com.au/blog/ >> >> >> On 25 March 2010 23:07, Che Vilnonis wrote: >> >>> >>> Back when CF8 was released, there were discussions about cfthread and >>> limitations when using CF8 standard edition vs. the enterprise edition. >>> Does >>> anyone know if anything has changed with cfthread in CF9 between the two >>> versions? >>> >>> Thanks, Che >>> >>> >>> >>> >> >> > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332286 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread limitations with CF9 Standard vs Enterprise
I think that Max Concurrent Threads was back in CF7. In CF8, they split things up so that there are settings for simultaneous Template requests, Flash Remoting requests, Web Service requests, CFC function requests which takes care of inbound requests and then CFReport and CFThread threads which governs code-generated threading. Judah On Thu, Mar 25, 2010 at 10:49 AM, Barney Boisvert wrote: > > I'm pretty sure in CF8 the limitation is 1 on standard, not 10. The > default "max concurrent threads" setting in the CF Administrator is > 10, but that's irrelevant on standard, since it's hard-capped at 1. > > cheers, > barneyb > > On Thu, Mar 25, 2010 at 10:43 AM, Judah McAuley wrote: >> >> Wow, that is a big change. The limit is 10 in CF8 standard. I'm sure >> glad I haven't upgraded my production app to CF9 and going the Railo >> route instead for thread happiness. I just wanted to get past the 10 >> thread limitation, never expected it to drop down to 2. >> >> Cheers, >> Judah >> >> On Thu, Mar 25, 2010 at 9:23 AM, James Holmes wrote: >>> >>> "CFTHREAD is limited to two additional spawned threads in Standard edition." >>> >>> http://www.adobe.com/products/coldfusion/pdfs/cf9_feature_comparison_matrix_ue.pdf >>> >>> mxAjax / CFAjax docs and other useful articles: >>> http://www.bifrost.com.au/blog/ >>> >>> >>> On 25 March 2010 23:07, Che Vilnonis wrote: >>> >>>> >>>> Back when CF8 was released, there were discussions about cfthread and >>>> limitations when using CF8 standard edition vs. the enterprise edition. >>>> Does >>>> anyone know if anything has changed with cfthread in CF9 between the two >>>> versions? >>>> >>>> Thanks, Che >>>> >>>> >>>> >>>> >>> >>> >> >> > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332284 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread limitations with CF9 Standard vs Enterprise
The limitation is when you are using cfthread in your code. Tasks run in the scheduler don't count toward the limit, nor does cfhttp. Cheers, Judah On Thu, Mar 25, 2010 at 11:25 AM, Rick Faircloth wrote: > > I think I'm running at least 7 simultaneous threads at times on CF9 dev > using scheduled tasks. The code inside a thread only processes > once a previously-running thread completes, but the thread names > still show up in the CF Monitor... > > ??? > > > > -Original Message- > From: Judah McAuley [mailto:ju...@wiredotter.com] > Sent: Thursday, March 25, 2010 1:44 PM > To: cf-talk > Subject: Re: CFThread limitations with CF9 Standard vs Enterprise > > > Wow, that is a big change. The limit is 10 in CF8 standard. I'm sure > glad I haven't upgraded my production app to CF9 and going the Railo > route instead for thread happiness. I just wanted to get past the 10 > thread limitation, never expected it to drop down to 2. > > Cheers, > Judah > > On Thu, Mar 25, 2010 at 9:23 AM, James Holmes > wrote: >> >> "CFTHREAD is limited to two additional spawned threads in Standard > edition." >> >> > http://www.adobe.com/products/coldfusion/pdfs/cf9_feature_comparison_matrix_ > ue.pdf >> >> mxAjax / CFAjax docs and other useful articles: >> http://www.bifrost.com.au/blog/ >> >> >> On 25 March 2010 23:07, Che Vilnonis wrote: >> >>> >>> Back when CF8 was released, there were discussions about cfthread and >>> limitations when using CF8 standard edition vs. the enterprise edition. >>> Does >>> anyone know if anything has changed with cfthread in CF9 between the two >>> versions? >>> >>> Thanks, Che >>> >>> >>> >>> >> >> > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332283 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread limitations with CF9 Standard vs Enterprise
You know, I went back and looked for the CF8 comparison like you did and it does, indeed, say the limit is 2 manually spawned threads. Then I went and logged into my CF8 Standard server and under Request Tuning it says the following: Maximum number of threads available for CFTHREAD The maximum number of threads created by CFTHREAD that will be run concurrently. Threads created by CFTHREAD in excess of this are queued. On Standard Edition, the maximum limit is 10. So which is correct? On Thu, Mar 25, 2010 at 10:51 AM, Mike Chabot wrote: > > The cfthread limit was two in CF8 standard. > > http://www.adobe.com/products/coldfusion/pdfs/cf8_featurecomp.pdf > > -Mike Chabot > > On Thu, Mar 25, 2010 at 1:43 PM, Judah McAuley wrote: >> >> Wow, that is a big change. The limit is 10 in CF8 standard. I'm sure >> glad I haven't upgraded my production app to CF9 and going the Railo >> route instead for thread happiness. I just wanted to get past the 10 >> thread limitation, never expected it to drop down to 2. >> >> Cheers, >> Judah >> >> On Thu, Mar 25, 2010 at 9:23 AM, James Holmes wrote: >>> >>> "CFTHREAD is limited to two additional spawned threads in Standard edition." >>> >>> http://www.adobe.com/products/coldfusion/pdfs/cf9_feature_comparison_matrix_ue.pdf >>> >>> mxAjax / CFAjax docs and other useful articles: >>> http://www.bifrost.com.au/blog/ >>> >>> >>> On 25 March 2010 23:07, Che Vilnonis wrote: >>> >>>> >>>> Back when CF8 was released, there were discussions about cfthread and >>>> limitations when using CF8 standard edition vs. the enterprise edition. >>>> Does >>>> anyone know if anything has changed with cfthread in CF9 between the two >>>> versions? >>>> >>>> Thanks, Che >>>> >>>> >>>> >>>> >>> >>> >> >> > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332282 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFThread limitations with CF9 Standard vs Enterprise
I think I'm running at least 7 simultaneous threads at times on CF9 dev using scheduled tasks. The code inside a thread only processes once a previously-running thread completes, but the thread names still show up in the CF Monitor... ??? -Original Message- From: Judah McAuley [mailto:ju...@wiredotter.com] Sent: Thursday, March 25, 2010 1:44 PM To: cf-talk Subject: Re: CFThread limitations with CF9 Standard vs Enterprise Wow, that is a big change. The limit is 10 in CF8 standard. I'm sure glad I haven't upgraded my production app to CF9 and going the Railo route instead for thread happiness. I just wanted to get past the 10 thread limitation, never expected it to drop down to 2. Cheers, Judah On Thu, Mar 25, 2010 at 9:23 AM, James Holmes wrote: > > "CFTHREAD is limited to two additional spawned threads in Standard edition." > > http://www.adobe.com/products/coldfusion/pdfs/cf9_feature_comparison_matrix_ ue.pdf > > mxAjax / CFAjax docs and other useful articles: > http://www.bifrost.com.au/blog/ > > > On 25 March 2010 23:07, Che Vilnonis wrote: > >> >> Back when CF8 was released, there were discussions about cfthread and >> limitations when using CF8 standard edition vs. the enterprise edition. >> Does >> anyone know if anything has changed with cfthread in CF9 between the two >> versions? >> >> Thanks, Che >> >> >> >> > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332278 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread limitations with CF9 Standard vs Enterprise
The cfthread limit was two in CF8 standard. http://www.adobe.com/products/coldfusion/pdfs/cf8_featurecomp.pdf -Mike Chabot On Thu, Mar 25, 2010 at 1:43 PM, Judah McAuley wrote: > > Wow, that is a big change. The limit is 10 in CF8 standard. I'm sure > glad I haven't upgraded my production app to CF9 and going the Railo > route instead for thread happiness. I just wanted to get past the 10 > thread limitation, never expected it to drop down to 2. > > Cheers, > Judah > > On Thu, Mar 25, 2010 at 9:23 AM, James Holmes wrote: >> >> "CFTHREAD is limited to two additional spawned threads in Standard edition." >> >> http://www.adobe.com/products/coldfusion/pdfs/cf9_feature_comparison_matrix_ue.pdf >> >> mxAjax / CFAjax docs and other useful articles: >> http://www.bifrost.com.au/blog/ >> >> >> On 25 March 2010 23:07, Che Vilnonis wrote: >> >>> >>> Back when CF8 was released, there were discussions about cfthread and >>> limitations when using CF8 standard edition vs. the enterprise edition. >>> Does >>> anyone know if anything has changed with cfthread in CF9 between the two >>> versions? >>> >>> Thanks, Che >>> >>> >>> >>> >> >> > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332274 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread limitations with CF9 Standard vs Enterprise
I'm pretty sure in CF8 the limitation is 1 on standard, not 10. The default "max concurrent threads" setting in the CF Administrator is 10, but that's irrelevant on standard, since it's hard-capped at 1. cheers, barneyb On Thu, Mar 25, 2010 at 10:43 AM, Judah McAuley wrote: > > Wow, that is a big change. The limit is 10 in CF8 standard. I'm sure > glad I haven't upgraded my production app to CF9 and going the Railo > route instead for thread happiness. I just wanted to get past the 10 > thread limitation, never expected it to drop down to 2. > > Cheers, > Judah > > On Thu, Mar 25, 2010 at 9:23 AM, James Holmes wrote: >> >> "CFTHREAD is limited to two additional spawned threads in Standard edition." >> >> http://www.adobe.com/products/coldfusion/pdfs/cf9_feature_comparison_matrix_ue.pdf >> >> mxAjax / CFAjax docs and other useful articles: >> http://www.bifrost.com.au/blog/ >> >> >> On 25 March 2010 23:07, Che Vilnonis wrote: >> >>> >>> Back when CF8 was released, there were discussions about cfthread and >>> limitations when using CF8 standard edition vs. the enterprise edition. >>> Does >>> anyone know if anything has changed with cfthread in CF9 between the two >>> versions? >>> >>> Thanks, Che >>> >>> >>> >>> >> >> > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332273 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread limitations with CF9 Standard vs Enterprise
Wow, that is a big change. The limit is 10 in CF8 standard. I'm sure glad I haven't upgraded my production app to CF9 and going the Railo route instead for thread happiness. I just wanted to get past the 10 thread limitation, never expected it to drop down to 2. Cheers, Judah On Thu, Mar 25, 2010 at 9:23 AM, James Holmes wrote: > > "CFTHREAD is limited to two additional spawned threads in Standard edition." > > http://www.adobe.com/products/coldfusion/pdfs/cf9_feature_comparison_matrix_ue.pdf > > mxAjax / CFAjax docs and other useful articles: > http://www.bifrost.com.au/blog/ > > > On 25 March 2010 23:07, Che Vilnonis wrote: > >> >> Back when CF8 was released, there were discussions about cfthread and >> limitations when using CF8 standard edition vs. the enterprise edition. >> Does >> anyone know if anything has changed with cfthread in CF9 between the two >> versions? >> >> Thanks, Che >> >> >> >> > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332272 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
RE: CFThread limitations with CF9 Standard vs Enterprise
Thanks James... -Original Message- From: James Holmes [mailto:james.hol...@gmail.com] Sent: Thursday, March 25, 2010 12:24 PM To: cf-talk Subject: Re: CFThread limitations with CF9 Standard vs Enterprise "CFTHREAD is limited to two additional spawned threads in Standard edition." http://www.adobe.com/products/coldfusion/pdfs/cf9_feature_comparison_matrix_ ue.pdf mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ On 25 March 2010 23:07, Che Vilnonis wrote: > > Back when CF8 was released, there were discussions about cfthread and > limitations when using CF8 standard edition vs. the enterprise edition. > Does > anyone know if anything has changed with cfthread in CF9 between the > two versions? > > Thanks, Che > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332268 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CFThread limitations with CF9 Standard vs Enterprise
"CFTHREAD is limited to two additional spawned threads in Standard edition." http://www.adobe.com/products/coldfusion/pdfs/cf9_feature_comparison_matrix_ue.pdf mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ On 25 March 2010 23:07, Che Vilnonis wrote: > > Back when CF8 was released, there were discussions about cfthread and > limitations when using CF8 standard edition vs. the enterprise edition. > Does > anyone know if anything has changed with cfthread in CF9 between the two > versions? > > Thanks, Che > > > > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332266 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
CFThread limitations with CF9 Standard vs Enterprise
Back when CF8 was released, there were discussions about cfthread and limitations when using CF8 standard edition vs. the enterprise edition. Does anyone know if anything has changed with cfthread in CF9 between the two versions? Thanks, Che ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332259 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: CF8 Developer Edition and CFTHREAD
> Anyone know offhand if the CFTHREAD limitation on two concurrent threads > found in the standard edition of CF8 is also in the developer edition? My understanding is that there is no difference between Enterprise and Developer with regard to CFTHREAD. If you have a spare Enterprise license laying around, you could plug the number in for a minute and see if there's any difference. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324431 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: CF8 Developer Edition and CFTHREAD
dev edition is enterprise limited to only 2 ip addresses Azadi Saryev Sabai-dee.com http://www.sabai-dee.com/ On 11/07/2009 00:14, Alan Rother wrote: > Hey All, > Anyone know offhand if the CFTHREAD limitation on two concurrent threads > found in the standard edition of CF8 is also in the developer edition? > > I'm building something for one of our CF8 Enterprise servers on my desktop > and the threaded process seems as equally slow as the non-threaded > process... If not, then I need to check for other bottlenecks in the > process. > > I'm know that in CF8 standard, the server will only process 2 CFTHREADs at a > time (it's an intentional limitation designed to push you to purchase Ent), > but it's that also in the developer edition... > > http://www.adobe.com/products/coldfusion/pdfs/cf8_featurecomp.pdf > > <http://www.adobe.com/products/coldfusion/pdfs/cf8_featurecomp.pdf>=] > ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324429 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
CF8 Developer Edition and CFTHREAD
Hey All, Anyone know offhand if the CFTHREAD limitation on two concurrent threads found in the standard edition of CF8 is also in the developer edition? I'm building something for one of our CF8 Enterprise servers on my desktop and the threaded process seems as equally slow as the non-threaded process... If not, then I need to check for other bottlenecks in the process. I'm know that in CF8 standard, the server will only process 2 CFTHREADs at a time (it's an intentional limitation designed to push you to purchase Ent), but it's that also in the developer edition... http://www.adobe.com/products/coldfusion/pdfs/cf8_featurecomp.pdf <http://www.adobe.com/products/coldfusion/pdfs/cf8_featurecomp.pdf>=] -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:324427 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Cfthread bug with sandboxing
On our CF8.01 servers we've noticed a bug with cfthread and sandboxing. Threads don't get the same permissions as the code that launched them; any action like a DB call, a file read etc taken inside a thread fails with sandbox related errors. The exception to this is the first page to call threads after a server restart; those threads get the right permissions and everything works. After this, when pages in other sandboxes try to run threads, problems occur for those other sandboxes (the first one continues to work). It's essentially first come first served, which is why I think it's a bug and not a feature. Has anyone else seen this problem? We're on SLES 10, CF Enterprise Multiserver (i.e. JRun). mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Want to reach the ColdFusion community with something they want? Let them know on the House of Fusion mailing lists Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:323525 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfthread and queue management
This is what I think I was trying to get at. Moving the loop into the thread instead of having the loop outside the thread is the part I think I was missing. Having a generic tool to do queue management could be quite handy. Of course I've since realized that my particular situation is slightly more complicated (isn't that always how it goes?) but this is an excellent place to start. Thanks Mark. Judah On Mon, Oct 27, 2008 at 6:02 PM, Mark Mandel <[EMAIL PROTECTED]> wrote: > You really need 5 threads that loop, while there is something to be > executed, and a Queue of CFCs that have a common execute() commands. > > something like: > > > > while(NOT queue.isEmpty()) > { > action = queue.pop(); > action.execute(); > } > > > > While there is probably some error checking, and logging etc, that is > the basic gist of building a queue processing system. > > Mark > > On Tue, Oct 28, 2008 at 10:39 AM, Alan Rother <[EMAIL PROTECTED]> wrote: >> Yeah... I kind of figured that was the deal, but I had to point it out. >> In that case Dave is right (as he almost always is...) keeping a single >> monitoring thread active to watch the others makes the most sense. >> >> One thing to watch our for in fully asynchronous threads is that error >> catching is much tricker. Many of the usual techniques don't work. I had to >> build a complex system that during development failed all the time, yet >> never logged a single error in the CF log files. The only solution I could >> come up with during dev was to wrap every segment of code in a cftry that >> used a webservice to report errors back to me through lighthouse. >> >> =] >> >> -- >> Alan Rother >> Adobe Certified Advanced ColdFusion MX 7 Developer >> Manager, Phoenix Cold Fusion User Group, AZCFUG.org >> >> >> > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314435 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfthread and queue management
You really need 5 threads that loop, while there is something to be executed, and a Queue of CFCs that have a common execute() commands. something like: while(NOT queue.isEmpty()) { action = queue.pop(); action.execute(); } While there is probably some error checking, and logging etc, that is the basic gist of building a queue processing system. Mark On Tue, Oct 28, 2008 at 10:39 AM, Alan Rother <[EMAIL PROTECTED]> wrote: > Yeah... I kind of figured that was the deal, but I had to point it out. > In that case Dave is right (as he almost always is...) keeping a single > monitoring thread active to watch the others makes the most sense. > > One thing to watch our for in fully asynchronous threads is that error > catching is much tricker. Many of the usual techniques don't work. I had to > build a complex system that during development failed all the time, yet > never logged a single error in the CF log files. The only solution I could > come up with during dev was to wrap every segment of code in a cftry that > used a webservice to report errors back to me through lighthouse. > > =] > > -- > Alan Rother > Adobe Certified Advanced ColdFusion MX 7 Developer > Manager, Phoenix Cold Fusion User Group, AZCFUG.org > > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314421 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfthread and queue management
Yeah... I kind of figured that was the deal, but I had to point it out. In that case Dave is right (as he almost always is...) keeping a single monitoring thread active to watch the others makes the most sense. One thing to watch our for in fully asynchronous threads is that error catching is much tricker. Many of the usual techniques don't work. I had to build a complex system that during development failed all the time, yet never logged a single error in the CF log files. The only solution I could come up with during dev was to wrap every segment of code in a cftry that used a webservice to report errors back to me through lighthouse. =] -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314418 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfthread and queue management
The problem with that is that I may want to use cfthread elsewhere on the server (like in cleanup/maintenance tasks) and in this particular application I want exactly 5 threads active at all times to maximize the usage of this external resource. Still, a sneaky idea that I had pondered as well. Judah On Mon, Oct 27, 2008 at 4:12 PM, Alan Rother <[EMAIL PROTECTED]> wrote: > So, you can only have it trying 5 threads at a time... > How about in the CF Admin, set your maximum simultaneous threads to 5. It > will queue all other requests until each one completes. Enterprise defaults > to 10 I believe... > > > =] ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314416 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfthread and queue management
So, you can only have it trying 5 threads at a time... How about in the CF Admin, set your maximum simultaneous threads to 5. It will queue all other requests until each one completes. Enterprise defaults to 10 I believe... =] -- Alan Rother Adobe Certified Advanced ColdFusion MX 7 Developer Manager, Phoenix Cold Fusion User Group, AZCFUG.org ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314413 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfthread and queue management
On Mon, Oct 27, 2008 at 3:20 PM, Dave Watts <[EMAIL PROTECTED]> wrote: > > I would recommend that you use one thread to monitor the others. This > thread could wake every 500ms, for example, then check the progress of > the other threads, terminate unresponsive threads, and assign new > tasks. > > There's an example of this in the Adobe Advanced ColdFusion 8 > Development course, actually. I was pondering this method and that may be what I go with but it seems like I ought to be able to trigger a new event based on the completion of a thread, along the lines of a callback function in JS. The sleep, wake, check, sleep paradigm is functional but it seems a bit inelegant. The child function ought to be able to say to the parent "Hey, I'm done now!" and have the parent launch another thread. But I can't quite wrap my head around how to make that happen. Thanks for the response though, its an excellent suggestion. Judah ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314412 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfthread and queue management
> I have a remote service that I call via cfhttp that does a processing > task. It is a commercial service and our license is based on the > number of simultaneous requests we can make against the service. So > lets say that I have 5 "ports" available to me, i.e., I can have 5 > active requests at any given time. Additional requests will be refused > by the remote service. > > On my side, I have a queue of requests that I need to get through. > What I'm trying to design is a simple setup where it launches the 5 > allowed http requests using cfthread (each task is independent of the > others) and when one of the threads completes, it goes and grabs the > next item that needs to be sent to this remote service that way we are > utilizing all 5 ports to full effect. > > I understand how to launch an individual thread. What I'm having > difficulty wrapping my head around is how to have it go fetch the next > item in the queue and launch a thread again until the queue has been > processed. > > It kind of seems like what I want to be doing is having a top level > variable that keeps track of what the next item in the queue is, then > down at the thread level, have my threads in some sort of a "while" > statement that keeps going until the queue is done, then have the > completion of a thread return a value that launches that thread again > with the current value of the top level variable and then changes the > top level variable to the next item in the queue. I would recommend that you use one thread to monitor the others. This thread could wake every 500ms, for example, then check the progress of the other threads, terminate unresponsive threads, and assign new tasks. There's an example of this in the Adobe Advanced ColdFusion 8 Development course, actually. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314411 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
cfthread and queue management
Howdy, I'm trying to wrap my head around the best way to use cfthread to manage a task queue. I have a remote service that I call via cfhttp that does a processing task. It is a commercial service and our license is based on the number of simultaneous requests we can make against the service. So lets say that I have 5 "ports" available to me, i.e., I can have 5 active requests at any given time. Additional requests will be refused by the remote service. On my side, I have a queue of requests that I need to get through. What I'm trying to design is a simple setup where it launches the 5 allowed http requests using cfthread (each task is independent of the others) and when one of the threads completes, it goes and grabs the next item that needs to be sent to this remote service that way we are utilizing all 5 ports to full effect. I understand how to launch an individual thread. What I'm having difficulty wrapping my head around is how to have it go fetch the next item in the queue and launch a thread again until the queue has been processed. It kind of seems like what I want to be doing is having a top level variable that keeps track of what the next item in the queue is, then down at the thread level, have my threads in some sort of a "while" statement that keeps going until the queue is done, then have the completion of a thread return a value that launches that thread again with the current value of the top level variable and then changes the top level variable to the next item in the queue. Any thoughts about the situation and ideas of how best to code it? Thanks in advance, Judah ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314410 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Terminated CFTHREAD gets logged
When I terminate a thread in this manner to kill runaway thread: Each thread that is terminated gets logged in the application log of the CF administrator with the following value: myThread34940: null How do I keep this from getting logged? Why does CF look at these as application errors? ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;207172674;29440083;f Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:313726 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfthread running condition?
What! Are you saying the Emperor has no clothes! :o) Why point out the obvious and ruin a perfectly good, pointless discussion! It very well may be time to go back to just consolidate more and more code into one or at least few threads. I think I got started on the separate threads way back when I was first testing parts of the functionality in a browser and wanted feedback through the browser output about how the processing was working. Then I moved that code into separate templates that had to run in a specific order to process all the data. (54 templates at this point) I think I've just become obsessed with making threads bend to my will. It's definitely been a good learning experience about cfthread. I'll have to sit back and reconsider how best to use cfthread now that I'm consolidating many similar functions into single templates and running them as scheduled tasks still. I wish there was a way to watch scheduled tasks at work...showing data processing, outputting results, starting and finishing of tasks, etc. I generally just run the tasks in a browser when I need to see feedback. Or I send myself an email with results I need to see. Am I missing some sort of obvious feedback method when scheduled tasks (and cfthread's, for that matter) are run? Rick > -Original Message- > From: Mark Mandel [mailto:[EMAIL PROTECTED] > Sent: Saturday, August 30, 2008 12:44 AM > To: CF-Talk > Subject: Re: cfthread running condition? > > Silly question - why not just run the executing code you want to fire > to happen at the end of thread 1? It has exactly the same result, > there is no need to create a whole new thread, as you can just > continue in the one you are in. > > Mark > > On Sat, Aug 30, 2008 at 12:26 PM, Dave Watts <[EMAIL PROTECTED]> wrote: > >> But unlike a "page thread" that's running in a browser, > >> the "scheduled task page thread" isn't subject to a > >> timeout, right? > > > > Why wouldn't it be? It's just another HTTP request. > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311830 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfthread running condition?
Yeah, I've been wondering why this would use multiple threads when the aim is to deliberately single thread the execution. On Sat, Aug 30, 2008 at 12:44 PM, Mark Mandel wrote: > Silly question - why not just run the executing code you want to fire > to happen at the end of thread 1? It has exactly the same result, > there is no need to create a whole new thread, as you can just > continue in the one you are in. -- mxAjax / CFAjax docs and other useful articles: http://www.bifrost.com.au/blog/ ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311829 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfthread running condition?
Silly question - why not just run the executing code you want to fire to happen at the end of thread 1? It has exactly the same result, there is no need to create a whole new thread, as you can just continue in the one you are in. Mark On Sat, Aug 30, 2008 at 12:26 PM, Dave Watts <[EMAIL PROTECTED]> wrote: >> But unlike a "page thread" that's running in a browser, >> the "scheduled task page thread" isn't subject to a >> timeout, right? > > Why wouldn't it be? It's just another HTTP request. > > Dave Watts, CTO, Fig Leaf Software > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311828 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfthread running condition?
> But unlike a "page thread" that's running in a browser, > the "scheduled task page thread" isn't subject to a > timeout, right? Why wouldn't it be? It's just another HTTP request. Dave Watts, CTO, Fig Leaf Software ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311820 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfthread running condition?
But unlike a "page thread" that's running in a browser, the "scheduled task page thread" isn't subject to a timeout, right? > -Original Message- > From: Dave Watts [mailto:[EMAIL PROTECTED] > Sent: Friday, August 29, 2008 7:09 PM > To: CF-Talk > Subject: RE: cfthread running condition? > > > I'm not too sure what constitutes a "page thread". > > > > Assuming that it's the processing of the .cfm page, then that > > wouldn't really apply, I don't think, because I'd be using > > these merged templates with multiple threads coded in them as > > part of scheduled tasks, which, if I understand correctly > > wouldn't involve a "page thread." > > The main thread is the one directly responding to the HTTP request. > Scheduled tasks are HTTP requests. > > Dave Watts, CTO, Fig Leaf Software > http://www.figleaf.com/ > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311818 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfthread running condition?
> I'm not too sure what constitutes a "page thread". > > Assuming that it's the processing of the .cfm page, then that > wouldn't really apply, I don't think, because I'd be using > these merged templates with multiple threads coded in them as > part of scheduled tasks, which, if I understand correctly > wouldn't involve a "page thread." The main thread is the one directly responding to the HTTP request. Scheduled tasks are HTTP requests. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311815 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfthread running condition?
I'm not too sure what constitutes a "page thread". Assuming that it's the processing of the .cfm page, then that wouldn't really apply, I don't think, because I'd be using these merged templates with multiple threads coded in them as part of scheduled tasks, which, if I understand correctly wouldn't involve a "page thread." I'm looking for a way to combine the 54 templates I currently have to process data every day into 4 or 5 templates. I actually tried setting the wait time to 0, and the template threw an error. When I set a time, it ran fine. Perhaps I should leave the wait time attribute out entirely. Perhaps that would default to 0. Also, even with the wait time set to 0, I don't want the "joining" threads to finish first...I want them to finish *after* the first thread that they would be joining. > -Original Message- > From: Joey Krabacher [mailto:[EMAIL PROTECTED] > Sent: Friday, August 29, 2008 4:20 PM > To: CF-Talk > Subject: Re: cfthread running condition? > > In the docs under timeout it says: > 'The number of milliseconds that the current thread waits for the thread or > threads being joined to > finish. If any thread does not finish by the specified time, the current > thread proceeds. > > If the attribute value is 0, the following action occurs: > > * The current thread continues waiting until all joining threads finish. > * If the current thread is the page thread, the page continues waiting > until the threads are joined, > even if you specify a page time-out.' > > This sounds like if you do not set the timeout attribute then the thread just > waits until the joining > thread finishes. > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311813 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfthread running condition?
In the docs under timeout it says: 'The number of milliseconds that the current thread waits for the thread or threads being joined to finish. If any thread does not finish by the specified time, the current thread proceeds. If the attribute value is 0, the following action occurs: * The current thread continues waiting until all joining threads finish. * If the current thread is the page thread, the page continues waiting until the threads are joined, even if you specify a page time-out.' This sounds like if you do not set the timeout attribute then the thread just waits until the joining thread finishes. > I checked into using a "join" thread and at first glance it seemed > perfect. But from the description in the docs, it seems to work > the opposite of what I'd hoped. From the docs: > > "The following code, for example, joins three threads to the current > thread > (often, the main thread). The current thread waits up to six seconds > for the > other threads to complete, and continues processing if one or more > threads do not complete by then." > > > > > > From the description, it sounds like a "join" action causes threads > that join > a running thread to wait until the "joining" threads are complete > before it > finishes. > > I must admit, it's a little confusing. I thought it would work as you > described, > that the joining threads would wait until the thread they were joining > was finished > before processing. But the description makes it sound the other way > around. > > ??? > > Rick > > > -Original Message- > > From: joey krabacher [mailto:[EMAIL PROTECTED] > > Sent: Friday, August 29, 2008 2:02 PM > > To: CF-Talk > > Subject: Re: cfthread running condition? > > > > You might be able to kick of the first thread (set the action to > run) then have a list or > something that > > you can loop over and have a "join" cfthread inside the loop with > the same name as the first one. > > Something like this. > > > > > > do something > > > > > > > > do something > > > > > > > > I have not tried this, but the 'join' action tells cf to wait for > the named thread(t1) to finish. > > > > Joey > > > > >Is there a way to make the start of one thread > > >conditional upon the ending of a previous thread? > > > > > >I want to keep only one thread at a time running > > >and would like to set up a series of threads to run, > > >but only one at a time. > > > > > >I've been doing this with scheduled tasks and emailing > > >completion to myself for verification of success each morning, > > >but running 54 schedule task templates currently, with having to > add > > >another 30 or so soon has just become quite cumbersome. > > > > > >Didn't know if there were any options. > > > > > >Too bad we can't number the threads to run sequentially > > >and set them to run only individually. > > > > > >Rick > > > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311809 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfthread running condition?
Rick Faircloth wrote: > Is there a way to break out of the cfscript block once > the status of the first thread, "2_hmls_offices", is "Completed" and go > on to process regular CFML code? There is nothing special about the ... code. This is not a requirment of threads or anything, just a personal preference for coding style. The entire example could easily be rewritten using tag syntax. . Not syntax checked to make sure I translated that 100% correctly but you should get the idea. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311808 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: cfthread running condition?
I started another thread with a question about some code in the docs that used a sleep function and a status check to delay a thread's start, but the code in the waiting thread was in blocks and the processing was supposed to occur in the block. I haven't used cfscript so I asked if it was possible to just have the block run and then let the rest of the thread use regular CFML, but my data didn't get processed by that particular thread, but the data was processed by all other threads in the .cfm. Here's the question as I posted it: I'm trying to set up a way to check the status of threads and implement a sleep function that loops and delays a following thread's initialization until the status of the first thread is "Completed". I found an example in the CF8 docs using a sleep timer this is placed just inside the opening tag of the cfthread that needs to wait. thread.sleepTimes=0; thread.initialized=false; while ((2_hmls_offices.Status != "COMPLETED") && (2_hmls_offices.Status != "TERMINATED")) { sleep(2000); thread.sleeptimes++; } // Only do the post-initilization code if 2_hmls_offices is complete. If (threadA.Status == "COMPLETED") { thread.initialized=true; // Post-initialization code would go here. } I understand what's happening inside the cfscript, but I'd like to continue the processing *outside* the cfscript tag and use regular CFML, not cfscript for the thread. This example states, in the last line "//Post-initialization code would go here". Can I just use the cfscript as is and follow the cfscript block with my cfqueries, etc., or would all my thread processing have to occur within the cfscript block? Is there a way to break out of the cfscript block once the status of the first thread, "2_hmls_offices", is "Completed" and go on to process regular CFML code? Thanks, Rick > -Original Message- > From: Ian Skinner [mailto:[EMAIL PROTECTED] > Sent: Friday, August 29, 2008 2:08 PM > To: CF-Talk > Subject: Re: cfthread running condition? > > Rick Faircloth wrote: > > Is there a way to make the start of one thread > > conditional upon the ending of a previous thread? > It should be possible using the thread.status feature. You would create > a thread then watch the status until it reports "completed" then start > the next thread. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311806 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: cfthread running condition?
I checked into using a "join" thread and at first glance it seemed perfect. But from the description in the docs, it seems to work the opposite of what I'd hoped. From the docs: "The following code, for example, joins three threads to the current thread (often, the main thread). The current thread waits up to six seconds for the other threads to complete, and continues processing if one or more threads do not complete by then." >From the description, it sounds like a "join" action causes threads that join a running thread to wait until the "joining" threads are complete before it finishes. I must admit, it's a little confusing. I thought it would work as you described, that the joining threads would wait until the thread they were joining was finished before processing. But the description makes it sound the other way around. ??? Rick > -Original Message- > From: joey krabacher [mailto:[EMAIL PROTECTED] > Sent: Friday, August 29, 2008 2:02 PM > To: CF-Talk > Subject: Re: cfthread running condition? > > You might be able to kick of the first thread (set the action to run) then > have a list or something that > you can loop over and have a "join" cfthread inside the loop with the same > name as the first one. > Something like this. > > > do something > > > > do something > > > > I have not tried this, but the 'join' action tells cf to wait for the named > thread(t1) to finish. > > Joey > > >Is there a way to make the start of one thread > >conditional upon the ending of a previous thread? > > > >I want to keep only one thread at a time running > >and would like to set up a series of threads to run, > >but only one at a time. > > > >I've been doing this with scheduled tasks and emailing > >completion to myself for verification of success each morning, > >but running 54 schedule task templates currently, with having to add > >another 30 or so soon has just become quite cumbersome. > > > >Didn't know if there were any options. > > > >Too bad we can't number the threads to run sequentially > >and set them to run only individually. > > > >Rick > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311805 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfthread running condition?
Rick Faircloth wrote: > Is there a way to make the start of one thread > conditional upon the ending of a previous thread? It should be possible using the thread.status feature. You would create a thread then watch the status until it reports "completed" then start the next thread. Don't have a code example, but that is what I would imagine from my reading and experimenting with threads a while back. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311798 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: cfthread running condition?
You might be able to kick of the first thread (set the action to run) then have a list or something that you can loop over and have a "join" cfthread inside the loop with the same name as the first one. Something like this. do something do something I have not tried this, but the 'join' action tells cf to wait for the named thread(t1) to finish. Joey >Is there a way to make the start of one thread >conditional upon the ending of a previous thread? > >I want to keep only one thread at a time running >and would like to set up a series of threads to run, >but only one at a time. > >I've been doing this with scheduled tasks and emailing >completion to myself for verification of success each morning, >but running 54 schedule task templates currently, with having to add >another 30 or so soon has just become quite cumbersome. > >Didn't know if there were any options. > >Too bad we can't number the threads to run sequentially >and set them to run only individually. > >Rick ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311796 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Re: cfthread running condition?
This should be pretty simple to achieve. One of the restrictions with threads is that a cfthread can not spawn another cfthread. So your going to need one scheduled task that runs at a suitable interval. It will need to see if theres a thread running and if not, kick off the first thread. The threads will need to report there current status somewhere the scheduled task can check - to a db or application scope. When the scheduled task next runs it checks if the previous task completed and then starts the next thread. Chris >Is there a way to make the start of one thread >conditional upon the ending of a previous thread? > >I want to keep only one thread at a time running >and would like to set up a series of threads to run, >but only one at a time. > >I've been doing this with scheduled tasks and emailing >completion to myself for verification of success each morning, >but running 54 schedule task templates currently, with having to add >another 30 or so soon has just become quite cumbersome. > >Didn't know if there were any options. > >Too bad we can't number the threads to run sequentially >and set them to run only individually. > >Rick ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311780 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
cfthread running condition?
Is there a way to make the start of one thread conditional upon the ending of a previous thread? I want to keep only one thread at a time running and would like to set up a series of threads to run, but only one at a time. I've been doing this with scheduled tasks and emailing completion to myself for verification of success each morning, but running 54 schedule task templates currently, with having to add another 30 or so soon has just become quite cumbersome. Didn't know if there were any options. Too bad we can't number the threads to run sequentially and set them to run only individually. Rick ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311774 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Long running process - cflock & cfthread
Thanks for this. Actually the earlier response made me forget about the cleverness of cfthread in this situation and look at just using cflock which I think does the trick perfectly well. Regards Richard > -Original Message- > From: Rich Kroll [mailto:[EMAIL PROTECTED] > Sent: 28 July 2008 03:25 > To: CF-Talk > Subject: Re: Long running process - cflock & cfthread > > You could use java to manage this, take a look at creating a "guarded > block": > > http://java.sun.com/docs/books/tutorial/essential/concurrency/ > guardmeth.html > > HTH, > Rich > > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309783 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Long running process - cflock & cfthread
You could use java to manage this, take a look at creating a "guarded block": http://java.sun.com/docs/books/tutorial/essential/concurrency/guardmeth.html HTH, Rich ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309782 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Long running process - cflock & cfthread
Easiest way I can see, if wrap a named around the process, with a 5 second timeout, and tell it not to throw an exception on timeout. Why use cfthread, if you are already in a scheduled task already? Mark On Mon, Jul 28, 2008 at 4:00 AM, Richard Meredith-Hardy <[EMAIL PROTECTED]> wrote: > Dear all > > My CF8 app has a scheduled event going off every 15 mins, for the > purposes of explanation I'll call this RAPID > > One thing it has to do can be very long running, up to a couple of hours > (no, it's not my code, but all to do with the response time from a > crappy old Sage line 100 accounts program). I'll call this XSLOW. > > Ideally, what I would like to do is for RAPID to look to see if XSLOW is > not running, and kick it off in a separate thread on a sort of > fire-and-forget basis, but I don't want any other instances of XSLOW > kicking off until it's finished. > > I could do this with some sort of external flag, but if XSLOW hangs or > the server gets rebooted or something there's the risk that XSLOW and > its flag will get out of synch and never run again. > > Can CFTHREAD somehow be scoped in the application scope so RAPID can > check for XSLOW's thread status every time it runs? > > I'm thinking that some sort of combination of CFTHREAD and CFLOCK will > do the trick, but I'm at a bit of a loss to see the exact way to do it. > > Thanks > > Richard > > > > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309773 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Long running process - cflock & cfthread
Dear all My CF8 app has a scheduled event going off every 15 mins, for the purposes of explanation I'll call this RAPID One thing it has to do can be very long running, up to a couple of hours (no, it's not my code, but all to do with the response time from a crappy old Sage line 100 accounts program). I'll call this XSLOW. Ideally, what I would like to do is for RAPID to look to see if XSLOW is not running, and kick it off in a separate thread on a sort of fire-and-forget basis, but I don't want any other instances of XSLOW kicking off until it's finished. I could do this with some sort of external flag, but if XSLOW hangs or the server gets rebooted or something there's the risk that XSLOW and its flag will get out of synch and never run again. Can CFTHREAD somehow be scoped in the application scope so RAPID can check for XSLOW's thread status every time it runs? I'm thinking that some sort of combination of CFTHREAD and CFLOCK will do the trick, but I'm at a bit of a loss to see the exact way to do it. Thanks Richard ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:309768 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: The Woes of CFThread -- going out of my mind!
> I'd try to really limit the number of threads your creating. > I'd even look at limiting things to a fixed number of worker > threads. Try dividing the work load between like 5 or 6 > threads. Have each thread process it's share of the work load > (i.e. each work load would handle 1/5 of the workload--so > w/500 records, thread one would work on records 1-100, thread > 2 would work on records 101-200, etc.) Dan and Brad's suggestions are the way to go here. With 1K concurrent threads, I'm surprised it's not failing even quicker. One common pattern of sorts to use here is to create a thread pool and a controller thread. The controller thread could keep track of which reports have and/or haven't been generated, and track the progress of the worker threads. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Software provides the highest caliber vendor-authorized instruction at our training centers in Washington DC, Atlanta, Chicago, Baltimore, Northern Virginia, or on-site at your location. Visit http://training.figleaf.com/ for more information! ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308911 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Missing Messages --- was Re: The Woes of CFThread -- going out of my mind!
I'd also check if there's a spam blocker 'upstream' from you, especially if your getting your mail through a business location. In addition, the server is set to try and send mail for 48 hours before dropping it. A network problem that prevents or distorts mail server connections within that time frame could also cause mail to not show up. On Thu, Jul 10, 2008 at 12:00 PM, Ian Skinner <[EMAIL PROTECTED]> wrote: > Brad Wood wrote: > > Dan, I already suggested this approach to IAN nearly a month ago-- > > twice. > > > > http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:307447 > > http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:307626 > > > > If he thought there was merit in that he probably would have tried it > > already. > > > > ~Brad > > I suspected I have not been getting all of HOF messages, but now I have > confirmation. I had noticed that once in a while I did not recieve a > copy of a message I sent to the lists. I also noticed that there were > increasing cases where there seemed to be replies to messages that I > never receive the original. > > I never received either of these replies a month ago. > > I do not see in messages from HOF in the spam folder at my end, but I am > not sure what may be happening in between. I'll have to look up > Micheal's address when I get back from my 9:00 am meeting to see if > anything is getting bounced back. > > > ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308878 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Missing Messages --- was Re: The Woes of CFThread -- going out of my mind!
OK, then. I'll take you off my black list. :) ~Brad -Original Message- From: Ian Skinner [mailto:[EMAIL PROTECTED] Sent: Thursday, July 10, 2008 11:00 AM To: CF-Talk Subject: Missing Messages --- was Re: The Woes of CFThread -- going out of my mind! Brad Wood wrote: > Dan, I already suggested this approach to IAN nearly a month ago-- > twice. > > http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:307447 > http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:307626 > > If he thought there was merit in that he probably would have tried it > already. > > ~Brad I suspected I have not been getting all of HOF messages, but now I have confirmation. I had noticed that once in a while I did not recieve a copy of a message I sent to the lists. I also noticed that there were increasing cases where there seemed to be replies to messages that I never receive the original. I never received either of these replies a month ago. I do not see in messages from HOF in the spam folder at my end, but I am not sure what may be happening in between. I'll have to look up Micheal's address when I get back from my 9:00 am meeting to see if anything is getting bounced back. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308876 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Missing Messages --- was Re: The Woes of CFThread -- going out of my mind!
Brad Wood wrote: > Dan, I already suggested this approach to IAN nearly a month ago-- > twice. > > http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:307447 > http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:307626 > > If he thought there was merit in that he probably would have tried it > already. > > ~Brad I suspected I have not been getting all of HOF messages, but now I have confirmation. I had noticed that once in a while I did not recieve a copy of a message I sent to the lists. I also noticed that there were increasing cases where there seemed to be replies to messages that I never receive the original. I never received either of these replies a month ago. I do not see in messages from HOF in the spam folder at my end, but I am not sure what may be happening in between. I'll have to look up Micheal's address when I get back from my 9:00 am meeting to see if anything is getting bounced back. ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308869 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: The Woes of CFThread -- going out of my mind!
Dan, I already suggested this approach to IAN nearly a month ago-- twice. http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:307447 http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:307626 If he thought there was merit in that he probably would have tried it already. ~Brad -Original Message- From: Dan G. Switzer, II [mailto:[EMAIL PROTECTED] Threads should be used with caution, because each thread is going to be taking up memory (although I'm not sure how much memory each thread uses.) Spawning off threads like this is in rapid fire succession is a good way for the JVM to run out of memory and once that happens, everything becomes really unstable. I'd try to really limit the number of threads your creating. I'd even look at limiting things to a fixed number of worker threads. Try dividing the work load between like 5 or 6 threads. Have each thread process it's share of the work load (i.e. each work load would handle 1/5 of the workload--so w/500 records, thread one would work on records 1-100, thread 2 would work on records 101-200, etc.) -Dan ~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;203748912;27390454;j Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:308867 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4