CF2016 - <cfinclude> dynamic template name - java.IO.IOException *sometimes*
Hello,
I have a problem with CF2016 after upgrading two of our three servers; all are running behind a load balancer. The CF2016 servers have had this problem multiple times since upgrading to CF2016, while the CF11 server has never had this problem. So I'm pretty confident it's CF2016.
Based on a URL parameter appl, we check to see if the index.cfm file exists in that folder:
<cfset filename="#appl#\index.cfm">
<cfif fileExists("d:\docs\#filename#")>
<cfinclude template="#filename#">
<cfelse>
<cfthrow type="applDoesNotExist">
</cfif>
This code gets run hundreds of thousands of times per day, most with no trouble at all.
Occasionally (maybe 3x a day), the bolded <cfinclude> line above errors with:
java.io.IOException
The process cannot access the file because it is being used by another process
Key points:
- This ONLY happens when cfincluding dynamically-created template names. Any instances where the template name is hard coded, e.g. <cfinclude template="testapp\index.cfm"> are not affected
- It can happen with any variation of #appl# - i.e. it's not just one #appl# that gets this error
- The .cfm files which it is trying to access EXIST
- The .cfm files which it is trying to access are UNTOUCHED and have been untouched, in most cases, for years.
- This is only happening in CF2016, not in CF11 with 100% matching settings (including things like template caching)
- Again, 99.99% of the time, the exact same URL gets hit and it works fine. In other words, it is hard to replicate this issue
I don't understand the error. We have ensured that no processes are touching .cfm files (and besides, the fact that this is only happening to files with *dynamically generated* (variable) names seems to contraindicate such an explanation)
Any ideas what behavior behind the scenes in CF2016 is causing this? Thanks for insight.
