Graham,

I haven't seen this exact error before, but do you perchance have a  
<cflock> around the QoQ code?

Query of queries are very expensive on the server and grow more so as  
the record set being manipulated increases.  Many times, the same  
functions performed in QoQ can be performed by rewriting the SQL used  
in the original query to return a more efficient query from the start.

If you must use QoQ with a large record set, you might try adding  
caching to the query to lower the overhead or scoping the manipulated  
record set as appropriate for later re-use.

The lock may be increasing the problem as the thread count stacks up  
while waiting for the ability to lock.  Once that happens, and CF  
reaches the maximum number of requests (as configured in the CF  
Admin) the initial request may not finish and the memory used to  
manipulate and handle the query record set may not be cleared for  
other requests.  I had to do some SQL optimizing last year on a  
client site which was having similar issues.

HTH,

Jon

On Oct 29, 2007, at 8:50 AM, graham bates wrote:

> Over the last few weeks we have noticed our servers starting to  
> queue up and often not recover; upon inspecting the stack trace, we  
> invariably see lines like the following;
>
> Thread "jrpp-485":
>      - waiting to lock <0x60597d10> (a java.lang.Class)
>     Runing a CFQUERY
>     at D:\Live\wwwroot\admin\blah.cfm:109
> Thread "jrpp-484":
>      - waiting to lock <0x60597d10> (a java.lang.Class)
>     Runing a CFQUERY
>     at D:\Live\wwwroot\admin\data\blah2.cfm:104
> Thread "jrpp-483":
>      - waiting to lock <0x60597d10> (a java.lang.Class)
>     Runing a CFQUERY
>     at D:\Live\cfc\outsource\blah3.cfc:53
>
>
> What is interesting, is that when these line numbers are followed,  
> they are always pointing to **Query of Queries**. Has anyone come  
> across this kind of thing before, my searches on these and other  
> forums reveal nothing.
>
> Many Thanks
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the answers you are looking for on the ColdFusion Labs
Forum direct from active programmers and developers.
http://www.adobe.com/cfusion/webforums/forum/categories.cfm?forumid-72&catid=648

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292276
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to