I am doing some performance test on a site running on ColdFusion 8 using 
FusionReactor.  There is one script that consistently ends up on the top of the 
long running requests list.  The script is very simple - it grabs a PDF file 
that already exists on the files system and streams it to the user.

<cfif fileExists( filePath & fileName ) >
        <cfheader name="Content-Disposition" value="attachment; 
filename=#fileName#">
        <cfcontent type="application/pdf" file="#filePath##fileName#">
<cfelse>
        <cfheader statuscode="410" statustext="Gone" />
        <p>We're sorry, but the page you have requested no longer exists on our 
site.</p>
</cfif>

The PDF files in question are pretty small ... 1 to 2 MB.  In some cases (but 
not all), the request logs in FusionReactor are showing this script running for 
200+ seconds.

Does anybody have any ideas why this would be happening and is there a better 
way to stream PDF files that are not web accessible (i.e. the user has to 
register, then they get the file streamed to them)?  I am not looking to change 
the workflow - i.e. copying the file and sending a link by email etc.  I have 
streamed files like this before and have never seen these kinds of performance 
issues.

Thanks for any input! 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:352030
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to