How to track how many requests are related to files serving cfcontent?

Since APE mod_xsendfile does not work with CF9 jrun_iis6_wildcard.dll , I stay with the service files reliably using <cfcontent>. Now the problem is that if the file download is large or the connection is slow, it will bind the CF request for a long period of time. Without the ability to provide a hard limit, you can theoretically reset the CF server with all requests related to the serving files.

I tried to do additional logging / logic below <cfcontent file="">, but I noticed that they are never reached and never executed.

<cfcontent file="test.mp3">

<!--- won't reach here --->
<cfdump output="console" var="#now()# download done!">

What can be done to avoid CF reduction due to processing too many cfcontent requests?

Update : good news! CF10 works with APE mod_xsendfile !

+5
source share
1 answer

Solution 1

Given that you are unlikely to have 100% true accounting due to uncontrolled factors (threads that get stuck, shutting down the service / server, etc.), you can do the following:

If you want to track common requests, you can use the application variable that you increase when you start working with the file. Then, when the content is executed, you decrease the counter. However, you want to take care to use cflock to ensure that this update does not cause any problems.

, , cflock, , .

SQL,

  • / false
  • /​​
  • / , ,
  • / - null,
  • ""

cfcontent , , , ID / "" "".

onerror , " [ ]" 1. = 1 (, onstartup )

( , ..)

.

2

, . , (, , , ), "" -, UUID . , Secret1.pdf cfdirectory , . - :

/files/xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx/Secret1.pdf, a, .

, , . . xxxxxxxx-xxxx-xxxx-xxxxxxxxxxxxxxxx 30 , .

0

All Articles