johnnyc0506
johnnyc0506

Reputation: 133

Coldfusion CFQUERY time limit exceeded

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.

Upvotes: 2

Views: 14363

Answers (2)

Anit Kumar
Anit Kumar

Reputation: 1228

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>

Upvotes: 0

Tomalak
Tomalak

Reputation: 338178

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.

Upvotes: 7

Related Questions