ColdFusion variables missing
<p>OK, I've been working with ColdFusion for 20 years and have never seen this. I have a ContentBox site (don't believe that is influencing the issue, but wanted to include the info) where I have front end web pages being pulled and back end code being run via event gateway. I receive around 30 gateway events every minute. My problem is that I have variables disappearing mid-routine when the front end web pages are run (typically to pull data from a database).</p>

<p>Because ContenBox/ColdBox module directories have Application.cfcs containing abort commands, the gateway event cfc is in a subfolder directly under the application root (since any aborts in a gateway cfc, or its Application.cfc, results in a gateway error).</p>

<p>The error point in the code is ever changing. Sometimes it's a structure key not being present WHILE looping over a structure's keys:</p>

<pre><code>for(var structKey in structureName)
{
    var structValue = structureName[structKey];
}
</code></pre>

<p>Other times the code is referencing a structure in the application scope and, again, a key that is present a few lines earlier is now missing and throwing an error. So it seems the various variable scopes (variables, application, etc.) are losing their values while the web page is being processed (which is often happening while gateway events are being processed).</p>

<p>The web server is tightly secured, and I don't have the issue in dev/staging which is not secured. So my instinct, of course, is that something in the security is causing this issue. I haven't seen anything in logs that can point me to the issue.</p>

<p>Due to contractual obligations, I cannot post the code here. That said, I think the description lends itself to the idea that the issue isn't with the CF code, but the hardening of the server.</p>

<p>Does anyone have any ideas what kinds of things could cause a CF application to lose variables mid-stream?</p>