silverspecv
Programmer
I am getting occassional 100% cpu usage, which I suspect is just bad code. Is there a way to track it down? Maybe list currently loaded/executing templates?
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<!--- pagetracker.cfm --->
<cfset currentpage = "#SCRIPT_NAME#">
<cfset nowdate = "#CreateODBCDateTime(Now())#">
<cfset yourdomain = "yourdomainname.com">
<cftry>
<cfif isDefined('http_user_agent')>
<cfset browsertype = http_user_agent>
<cfelse>
<cfset browsertype = 'unknown'>
</cfif>
<CFQUERY DATASOURCE="pagetracker" NAME="addnewpage">
INSERT INTO pagetracker (pagename,dateloaded,browsertype)
VALUES ('#currentpage#',#nowdate#,'#browsertype#')
</CFQUERY>
<cfcatch>
<!--- used for error processing --->
<cfset sendto = "webmaster@#yourdomain#">
<cfset sendfrom = "webmaster@#yourdomain#">
<cfset sendtitle = "problem with pagetracker">
<cfset sendtext = "Current Page: #currentpage# Date: #nowdate#">
<CFMAIL FROM="#trim(sendfrom)#" TO="#trim(sendto)#" SUBJECT="#trim(sendtitle)#" type="html">
<CFMAILPARAM name="Content-Transfer-Encoding" value="8bit">
<CFMAILPARAM name="Mailer" value="#yourdomain#">
<cfmailparam name="Message-id" value="<#CreateUUID()#@#yourdomain#>">
<CFMAILPARAM Name="Reply-To" Value="#trim(sendfrom)#">
#trim(sendtext)#<br>
<cfdump var="#cfcatch#"><br>
<cfdump var="#cgi#"><br>
<cfif isdefined("cfhttp.filecontent")>
<cfdump var="cfhttp.filecontent">
</cfif>
</cfmail>
</cfcatch>
</cftry>
I am getting occassional 100% cpu usage, which I suspect is just bad code. Is there a way to track it down? Maybe list currently loaded/executing templates?