Question
Server locking up
Hi all,
The following code locks up my server when there are several messages to read (works fine if theres only 10 or so). Should I be using the <CFLOCK> tag with this??
Thanks
<CFSET ThisMonth = "#DatePart('m', Now())#">
<CFSET ThisDay = "#DatePart('d', Now())#">
<CFSET ThisYear = "#DatePart('yyyy', Now())#">
<cfinclude template="Navigation.cfm">
<CFOUTPUT>Inserting Mail on #SetServerDesc#</CFOUTPUT><br>
<cfdirectory action="list" directory="c:\cfusionmx\mail\undelivr\FromWEB1" name="Files" sort="datelastmodified desc">
<CFLOOP query="Files">
<CFPARAM name="InsertCount" default="0">
<cffile action="read" file="c:\cfusionmx\mail\undelivr\fromWEB1\#Files.Name#" variable="FileRead">
<CFQUERY name="InsMail" datasource="#Request.DSN#">
Insert Into _UndelivrEmail (UE_Attributes,UE_DateLastModified,UE_Mode,UE_Name,UE_FileSize,UE_Type,UE_ServerDesc,UE_EmailBody)
Values('#Files.Attributes#','#Files.DateLastModified#','#Files.Mode#','#Files.Name#','#Files.Size#','#Files.Type#','#SetServerDesc#','#FileRead#')
</CFQUERY>
<CFSET InsertCount = "#Evaluate(InsertCount +1)#">
</CFLOOP>
The following code locks up my server when there are several messages to read (works fine if theres only 10 or so). Should I be using the <CFLOCK> tag with this??
Thanks
<CFSET ThisMonth = "#DatePart('m', Now())#">
<CFSET ThisDay = "#DatePart('d', Now())#">
<CFSET ThisYear = "#DatePart('yyyy', Now())#">
<cfinclude template="Navigation.cfm">
<CFOUTPUT>Inserting Mail on #SetServerDesc#</CFOUTPUT><br>
<cfdirectory action="list" directory="c:\cfusionmx\mail\undelivr\FromWEB1" name="Files" sort="datelastmodified desc">
<CFLOOP query="Files">
<CFPARAM name="InsertCount" default="0">
<cffile action="read" file="c:\cfusionmx\mail\undelivr\fromWEB1\#Files.Name#" variable="FileRead">
<CFQUERY name="InsMail" datasource="#Request.DSN#">
Insert Into _UndelivrEmail (UE_Attributes,UE_DateLastModified,UE_Mode,UE_Name,UE_FileSize,UE_Type,UE_ServerDesc,UE_EmailBody)
Values('#Files.Attributes#','#Files.DateLastModified#','#Files.Mode#','#Files.Name#','#Files.Size#','#Files.Type#','#SetServerDesc#','#FileRead#')
</CFQUERY>
<CFSET InsertCount = "#Evaluate(InsertCount +1)#">
</CFLOOP>