How to Increase ColdFusion Timeout

5.7k Views Asked by At

I have a CFM Page where I call a Stored Procedure. The page seems to be timing out due to the query taking too long to execute. We have tried optimizing/tuning the SQL query, made Clustered and Non-Clustered Indices , but the query is still taking around 4 minutes to execute.

Now , the only way to solve this is to increase the Cold Fusion Timeout in the Front End. But ,I have tried increasing the timeout by using the below snippet on the CFM page.

<cfsetting requestTimeOut="600"> 

But this is not working. The page keeps timing out after 120 seconds and throws the timeOut Error. We have also tried to pass a URL parameter "requestTimeout=600" but still the page is getting timed out after 120 seconds.

Can you please suggest a solution to increase the TimeOut in ColdFusion other than the ways we have tried above.

2

There are 2 best solutions below

0
On

You can call a stored procedure using the cfquery tag instead of the Cfstoredproc tag. Below a simple example:

<cfquery name="qryName" datasource="#yourdatabase#">
call nameOfStoredProcedure( #yourvariables#);
</cfquery>

I use mysql as the back end database engine, i do not know if this also works with other database engines.

5
On

Cfstoredproc has a timeout attribute you can use. Documentation is here.

Edit Starts Here

For MX7, try a cfquery tag

<cfquery timeout = something>
exec yourProcedure
@param1 = <cfqueryparam etc>
etc
</cfquery>