Does the cfflush ColdFusion 11 tag work incorrectly?

Anyone have problems with the cfflush tag in ColdFusion 11? We have a regular program that updates the counter of live records when it processes the loop. In ColdFusion 10, this works fine. In ColdFusion 11, it waits until the end of the loop refreshes the screen. In fact, we did not expect.

Edited to add code as requested ...

<script language="javascript"> addOutputLine('<br /><span id="insertCount">Records Inserted: 0</span>') </script> <cfset insertCount = 0> <cfset updateCountAfter = 1> <cfif qry.recordcount gt 5000> <cfset updateCountAfter = 10> </cfif> <cfoutput query="qry" startrow="#DATASTART#"> <!---do some stuff here that is not important to this issue---> <cfset insertCount = insertCount + 1> <cfif updateCountAfter gt 1> <cfif insertCount mod updateCountAfter eq 0> <script language="javascript">document.getElementById('insertCount').innerHTML = 'Records Inserted: #insertCount#';</script> </cfif> <cfelse> <script language="javascript">document.getElementById('insertCount').innerHTML = 'Records Inserted: #insertCount#';</script> </cfif> <cfflush> </cfoutput> 
+5
source share
1 answer

Comment Promotion

There is a need to configure the <cfflush> to work properly with the web server. On the documentation page for Configuring Web Servers on Windows , the section "Configuring IIS for ColdFusion on Windows", among other things, indicates:

To disable the web server buffer, change is_buffer_enable [sic] to false in the cfroot \ config \ wsconfig \ 1 \ isapi_redirect.properties file. Disable the web server buffer if you want cfflush to work through the IIS connector. If your application does not use cfflush, set it to true to increase performance.

Please note that there is a typo in the Adobe documentation I mentioned above. It should specify iis_buffer_enable , not is_buffer_enable (missing "i"). Thanks to KrunchMuffin for pointing this out.

You will need to restart IIS for this change to affect.

I am not sure if the performance implications have disabled this option. You will need to do some load testing for your specific environment.

+10
source

Source: https://habr.com/ru/post/1207622/


All Articles