Coldfusion CFQUERY time limit exceeded

13.4k views Asked by At

I have a saved XML file which is 7.1mb and contains over 1000 properties and all the info for those properties. My cfscript parses and then inserts the properties into the property table along with features and image URLs to their respective tables.

However, the process bombs out usually after it has passed 250 records and then gives me this error:

 The request has exceeded the allowable time limit Tag: CFQUERY 

I have put a timeout value of 9000000 in my cfquery tag and that does nothing. I don't know what else to do to resolve this.

2

There are 2 answers

3
Tomalak On BEST ANSWER

The error says "The request has exceeded the allowable time".

It only tells you what tag was responsible so you know what CF was doing in that moment. Increasing the query timeout does not increase the overall request timeout.

<cfsetting requesttimeout="500">

https://wikidocs.adobe.com/wiki/display/coldfusionen/cfsetting

In parallel you should try to rewrite the query to take less time as well.

3
Anit Kumar On

Since, you are not sure about the time taken by query to execute, you can go with an infinite timeout. Once you are able to capture the time taken, set the same as RequestTimeout.

<!--- Overriding Timeout mentioned in CF Admin --->
<cfsetting RequestTimeout = "0"> 
<cfset start = GetTickCount()> 

           Your query here

<cfoutput>Execution Time: <b>#int(getTickCount()-start)#</b> milliseconds<br></cfoutput>