找到你要的答案

Q:Coldfusion CFQUERY time limit exceeded

Q:ColdFusion cfquery超过时限

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.

我有一个保存XML文件是7.1mb包含1000属性和所有信息的性质。我cfscript解析,然后将属性的属性表以及特征和图像的URL到各自的表。

然而,过程炸弹通常在它通过250记录后,然后给我这个错误:

 The request has exceeded the allowable time limit Tag: CFQUERY 

我已经把9000000的超时值在cfquery标签,没有我。我不知道还能做些什么来解决这个问题。

answer1: 回答1:

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.

错误表示“请求超出了允许的时间”。

它只告诉你标签是什么,所以你知道CF在那一刻做了什么。增加查询超时不会增加整体请求超时。

<cfsetting requesttimeout="500">

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

并行地,您应该尝试重写查询以占用更少的时间。

answer2: 回答2:

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>

由于您不确定查询执行的时间,您可以使用无限超时。一旦你能够捕获时间,设定相同的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>
xml  coldfusion  cfquery