CFFlush issues

Recently migrated from an old CF9 instance for an old app to Lucee

Having an issue getting CFFlush to work. Page loads fully at end. Previous server runs code and flushes with no error.

Code being executed:

<cfloop from="1" to="100" index="a">
	<cfflush interval="1">

Server is Win Serv 2012 r2
IIS 8.5
Boncode connected
Apache Tomcat v9035

Hi @Richx1,

What is the exact issue occuring with your code? Please provide more informations about the error, such as stacktrace etc

It’s not an error, per se. I believe this to be a configuration issue.

The code does not flush to screen in intervals. The code is not being displayed till the whole loop is completed.

Expected result is to see the code flush periodically to screen so that I will see the numbers increment on the screen as the page loads.

Example: (old server, flushing correctly)

New Server: (new server, page loads all content at end)


There are some pitfalls with cfflush. Do you have some sort of compression enabled at webserver level?

Please see also CFFLUSH not working

Compression is enabled on both servers (new and old). I removed compression on the new and restarted the site. Same issues. I checked the thread you linked also… nothing there to point me to why it is acting up. Tested the code on Lucee Express desktop version and it acted the same way. Leads me to wonder if this is a setting in the web server or tomcat?

I adjusted boncode settings and set FlushThreshold to 20000 as suggested elsewhere… still nothing. This is really becoming a challenge as I need cfscheduler to not timeout on long requests either. Flush was preventing that in CF9.


Does it also happen if you request Tomcat directly on port 8888 (e.g. from the local machine? What is strange is that your code behaves just the same at trycf with ACF.

My server admin locked down 8888 for this site on the server… local and remote.

Not sure I can test it there… but the local desktop express version I am running on 8888 on my desktop has the same issues.


For flushing to work gzip compression needs to be turned off in both your web server and in Lucee (Lucee admin --> Settings --> Output --> Compression. This is probably okay in development but in production you probably want to have gzip compression enabled at some point in your stack.

Turned off compression in lucee server and web settings for output. Disabled compression for both dynamic and static content in IIS. Same issues.


Not sure compression is the issue… seeing that with it on or off I am getting the same results.


Rich, can you confirm whether you’re using a VPN or not? It’s one of the issues indicated in the first link on flush issues that Andreas had shared.

Not using a VPN. Both new and old machines are behind a NSA. New server is on a NAT, but the old machine is performing to spec. But to negate the NAT question, we tested on local host and the result is the same.

We moved the test file into Tomcat’s Root and tested there via 8888 (removing IIS from the mix) and we got the same result using only Tomcat/Lucee.


Response headers on localhost:8888

|Response|HTTP/1.1 200 |
|Date|Thu, 05 Aug 2021 21:06:25 GMT|

Response Headers on public URL:
|Response|HTTP/1.1 200 OK|
|Date|Thu, 05 Aug 2021 21:10:26 GMT|

Have you enabled flushing in your BonCode settings. it is off by default.

If you used standard install you can add something like this to your setting file BonCodeAJP14.settings in C:\Windows

Also check the flushing info in docs if you want to make changes:

1 Like


I had been updating the flushThreashold in the settings file in C:\lucee\AJP13 instead of windows. After updating and restarting services… the result is on target.

@Bilal @carehart @justincarter @andreas - Thanks gents on all your help!



Likewise! This helped me just now as well. Thanks all!

1 Like