Copy link to clipboard
Copied
The request has exceeded the allowable time limit Tag: CFQUERY
Copy link to clipboard
Copied
This means that the problem is wherever your cfquery is.
If you are using a cfc then check it there...
If it is in your home page then... check it there...
(besides it's not bad script, your query takes too long to process, there might be other reasons for it).
Copy link to clipboard
Copied
I MEAN THIS FOR SURE IS IN HOME PAGE THE BUG. SINCE TRIED ACCESS HOME PAGE? And not elsewhere in a subpage, as of down server for example, correct?
Copy link to clipboard
Copied
Hard to understand you.
As I said, I know nothing about your website, so I would not know where your query is.
If you DO NOT have a file "somethingorother.CFC" then I suppose it is in whatever page you were testing.
Hard to be more precise with so little information, with the message you posted there's no way to say where the problem is coming from...
Copy link to clipboard
Copied
NO, IT DOESN'T NECESSARILY MEAN THAT.
Are you using Application.cfc or Application.cfm? The error could be there.
Are you using CFINCLUDE? The error could be there.
Are you sure your database server is running? The error could be there.
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/
Copy link to clipboard
Copied
I use shared hosting environment...No use application.cfm or cfc,... welll is home page faults and particularly cfquery syntax ,...error is:
The request has exceeded the allowable time limit Tag: CFQUERY
go and post my syntax?
Copy link to clipboard
Copied
Did you read what I posted earlier?
--
Adam
Copy link to clipboard
Copied
this is code above <html>, I may used many cfqueries in a shared hosting environment?
<cfapplication name="pp" sessionmanagement="yes" sessiontimeout="#createtimespan(0,0,20,0)#">
<cfparam name="Session.off" default="0">
<cfquery datasource="mysqlcf_" name="getData11" >
select p.* from Products p join SidesFeaturedList s on p.Product_ID = s.Product_ID AND p.Visibility=1 order by s.AA
</cfquery>
<cfif (getData11.recordcount LT Session.off)>
<cfset Session.off=0>
</cfif>
<cfset startrow1=Session.off+5>
<cfset endrow1=Session.off+8>
<cfset startrow2=Session.off+1>
<cfset endrow2=Session.off+4>
<cfset Session.off=Session.off+8>
<cfquery datasource="mysqlcf_" name="getDatai13" >
select p.* from Products p join ThreeFeaturedList2 s on p.Product_ID = s.Product_ID order by s.AA
</cfquery>
<CFIF #CGI.HTTP_X_Forwarded_For# NEQ "">
<CFSET ipaddress="#CGI.HTTP_X_Forwarded_For#">
<CFELSEIF #CGI.Remote_Addr# NEQ "">
<CFSET ipaddress="#CGI.Remote_Addr#">
<CFELSE>
<CFSET ipaddress="UNKNOWN">
</CFIF>
<CFSET ref = "#CGI.HTTP_REFERER#">
<CFSET userAgent = "#CGI.HTTP_USER_AGENT#">
<cfset todayDatePlus9hours = dateadd("h",16,now())>
<cfset today = DateDiff("s", createDatetime(1970,1,1,0,0,0), todayDatePlus9hours) >
<cfparam name="cookie.countNumVisitor" default="-1">
<cfparam name="Session.countNumVisitor" default="-1">
<CFIF cookie.countNumVisitor NEQ "-1">
<!--- START RETURNING VISITOR--->
<cfset countNumVisitor = cookie.countNumVisitor>
<cfcookie name="FIRSTTimeVisitor" value="B" expires="never" domain=".polisphotos.com" path="/">
<cfquery datasource="mysqlcf_" name="updateVisitor" >
UPDATE Visitors SET LastVisitDate=#today# WHERE countNumVisitor=#countNumVisitor#
</cfquery>
<cfcookie name="countNumVisitor" domain=".polisphotos.com" value="#countNumVisitor#" expires="never" path="/">
<!--- END RETURNING VISITOR--->
<CFELSE>
<!--- START NEW VISITOR--->
<cfquery datasource="mysqlcf_" name="selectVisitor" >
SELECT countNumVisitor FROM Visitors
</cfquery>
<cfparam name="countNumVisitor" default="-1">
<cfset countNumVisitor = selectVisitor.recordcount>
<cfquery datasource="mysqlcf_" name="insertVisitor" >
INSERT INTO Visitors VALUES (#countNumVisitor#,"#ipaddress#",NULL,"#userAgent#",NULL,NULL,#today#,#today#,1,"#ref#",NULL)
</cfquery>
<cfcookie name="countNumVisitor" value="#countNumVisitor#" expires="never" domain=".polisphotos.com" path="/">
<cfset Session.countNumVisitor=countNumVisitor>
<!--- END NEW VISITOR--->
</CFIF>
<CFIF cookie.countNumVisitor NEQ "-1" and Session.countNumVisitor NEQ cookie.countNumVisitor>
<!--- START RETURN VISITOR - OTHER SESSION--->
<cfquery datasource="mysqlcf_" name="selectVisitorTimes" >
SELECT TimesVisited FROM Visitors WHERE countNumVisitor=#countNumVisitor#
</cfquery>
<cfif selectVisitorTimes.RECORDCOUNT >
<cfset TimesVisited = selectVisitorTimes.TimesVisited>
<cfelse>
<cfparam name="TimesVisited" default="1">
</cfif>
<cfset Time = #TimesVisited# + 1>
<cfquery datasource="mysqlcf_" name="updateVisitor2" >
UPDATE Visitors SET TimesVisited=#Time# WHERE countNumVisitor=#countNumVisitor#
</cfquery>
<cfset Session.countNumVisitor=countNumVisitor>
<!--- END RETURN VISITOR - OTHER SESSION--->
</CFIF><html>
Copy link to clipboard
Copied
I'd re-evaluate whether you need to run those two product-centric queries every request, as a matter of course. Is that data needed on every page on the site? I doubt it. How often does the data change? Is it essential to re-fetch it every mouseclick (for every user)? Also, I would have thought that product data would be application-specific, not user-specific, so further grounds to not be running it every request. Also: SELECT *. Do you really need to fetch every column? You actually need every coumn?
Also, you ought to be parameterising the dyanmic values inyour queries with CFQUERYPARAM, not simply hard-coding them into your SQL string. The way you're doing it will put unnecessary strain on the DB.
This might not be your problem, but it seems to me you're perhaps doing a lot of work you perhaps don't need to be, there.
--
Adam
Copy link to clipboard
Copied
It just means that the page currently being requested (whichever that is) is taking longer to process than the Request Time-out setting you have set in CF Administrator.
You need to stick some telemetry in the templates comprising that page to find out which bit is taking a long time, and from there try to work out how to deal with it.
In general any page that takes longer than 1-2sec to process on the CF end is too slow. I'd start worrying if a page was taking longer than 500ms for CF to process. Obviously this would not count requests like those for long-running scripts or reports, but just general web pages.
--
Adam