Apache / Lucee and CFFLUSH

183 views
Skip to first unread message

Jeff Roberson

unread,
Feb 29, 2016, 1:02:27 PM2/29/16
to Lucee
I am trying to get CFFLUSH to work with Apache and Lucee and not having very much luck. I saw another post with using IIS, but that's not an option for me.  I have tried disabling compression on apache, but that didn't seem to help. Anyone figured this out yet?

Thanks in advance.

Running :

Apache 2.2
Tomcat 8.0.28
Lucee 4.5.2.018

Mark Drew

unread,
Feb 29, 2016, 1:14:18 PM2/29/16
to lucee
Want to post some code?


--
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/f86ad567-5349-47aa-b5c7-b5ed73c3bcbd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jeff Roberson

unread,
Feb 29, 2016, 1:30:38 PM2/29/16
to Lucee
Sure I'll work up an example.

I was just wondering if anyone had worked on this before. I'll have somethign shortly.

Thanks for the Reply.

Andrew Dixon

unread,
Feb 29, 2016, 2:42:24 PM2/29/16
to lu...@googlegroups.com
Hi Jeff,

How have you connected Apache to Tomcat? mod_cfml, mod_jk, etc...

Kind regards,

Andrew

Jeff Roberson

unread,
Feb 29, 2016, 2:55:47 PM2/29/16
to lu...@googlegroups.com
Hi Andrew,

It’s setup with mod_cml, mod_proxy. Actually in writing and example for Drew I think it is working and my program execution order is causing the issue :).

I’ll post up shortly with what I find out.

Thanks!



You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/8bC3RcJmE-g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.

To post to this group, send email to lu...@googlegroups.com.

Jeff Roberson

unread,
May 10, 2016, 12:13:45 PM5/10/16
to Lucee
So I figured out what was causing this issue. the following example ign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>

The CFPROCESSINGDIRECTIVE was overriding/Cancelling the CFFLUSH. In Adobe Coldfusion the CFFLUSH still functions inside of the CFPROCESSINGDIRECTIVE so it took me awhile to figure this out.  Hope this helps anyone else that runs into this issue.  this was specific to a Fusebox application we have, but if you are using CFPROCESSINGDIRECTIVE it's worth noting.  The Suppress White Space option in the Lucee Administrator doesn't seem to harm the CFFLUSH so that might be another option for your applications.


To unsubscribe from this group and stop receiving emails from it, send an email to lucee+unsubscribe@googlegroups.com.

To post to this group, send email to lu...@googlegroups.com.

-- 
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
--- 
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/8bC3RcJmE-g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+unsubscribe@googlegroups.com.

Igal @ Lucee.org

unread,
May 10, 2016, 12:25:06 PM5/10/16
to lu...@googlegroups.com

The CFPROCESSINGDIRECTIVE was overriding/Cancelling the CFFLUSH.

To clarify: the processing directive does not override the flush, but it suppresses all of the whitespace, so when you do <cfflush interval="1"> which should trigger a flush after every "1" character -- nothing happens because the whitespace character is not emitted in the first place.

In Adobe Coldfusion the CFFLUSH still functions

IIRC then ACF doesn't suppress all of the whitespace (it retains LINE_FEED characters or something like that), so every "1" LF character will trigger a flush.  If you ask me -- when I write "SuppressWhiteSpace" -- I mean "I want the WS suppressed", so that's a "bug" on their end.


Igal Sapir
Lucee Core Developer
Lucee.org

Jeff Roberson

unread,
May 10, 2016, 12:57:19 PM5/10/16
to Lucee
Igal,

I guess my example wasn't the best using the &nbsp; and granted it's much more simplistic than my production code.  Even if you replace the spaces/nbsp; with another character that is not a space the  CFPROCESSINGDIRECTIVE seems to "wait" for everything inside it to execute. Causing the CFFLUSH to not work as expected in my case.

I would expect this to work :
<cfprocessingdirective suppresswhitespace="Yes">

<cfflush interval="50" />

<p>

This page is runnning!

</p>

AAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

<cfset sleep(10000) />

<p>

This page Finished!

</p>

</cfprocessingdirective>


But it waits the full 10 seconds before the entire output of the page returns to the browser. 

The next set of code with it after works as expected:

<cfflush interval="50" />


<p>

       This page is runnning!

</p>


AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA


<cfset sleep(10000) />


<p>

       This page Finished!

<p>


<cfprocessingdirective suppresswhitespace="Yes">


<p>This has white space removed, but flush still works</p>


</cfprocessingdirective>


Anyway just thought I would let others know in case they run into it. 

Thanks for all the work on Lucee! It's great.

Jeff R.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/5301b542-a04d-437a-a701-2b3ecde98ab0%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

-- 
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
--- 
You received this message because you are subscribed to a topic in the Google Groups "Lucee" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/lucee/8bC3RcJmE-g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to lucee+un...@googlegroups.com.

To post to this group, send email to lu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/lucee/CAG1WijXwx3dJ9Uy5J_dhqm-sV5J650Ds-SGPaEjyORgk69ixug%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Igal @ Lucee.org

unread,
May 10, 2016, 2:13:11 PM5/10/16
to lu...@googlegroups.com

A couple of questions:

1) Are you fronting Lucee with a web server or are you calling Tomcat directly in this example?

2) So if you modify the code and add in the beginning (before the processing-directive):

    <h1>Starting...</h1>
    <cfflush>

Do you see the "Starting..." immediately?


Igal Sapir
Lucee Core Developer
Lucee.org

Message has been deleted

Jeff Roberson

unread,
May 10, 2016, 3:00:26 PM5/10/16
to Lucee
I actually have a Apache / Tomcat / Lucee server and a Tomcat / Lucee only server in production.
I tried my original code on both and get the same results.

Apache Tomcat/8.0.28
Lucee 4.5.2.018 final
On Both 

and Apache 2.2 with mod_proxy / mod_cfml on one of them

No matter what I set the interval too in the CFFLUSH tag both Lucee and Adobe CF seem to need a minimum amount of data to work thus the A's.

<h1>Starting......</h1>
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
<cfflush interval="1" />
<cfprocessingdirective suppresswhitespace="Yes">
<p>
This page is runnning!
</p>
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

<cfset sleep(10000) />
<p>
This page Finished!
<p>

This test
</cfprocessingdirective>

The above sends back the Starting... but the This page is running! and the This page is Finished! take the 10s sleep time.

Same for Tomcat / Lucee and Apache / Tomcat / Lucee

Hope this helps.

Jeff R

Igal @ Lucee.org

unread,
May 10, 2016, 4:04:37 PM5/10/16
to lu...@googlegroups.com

ok, I wanted to make sure that the web server is not buffering the output.

if you believe this to be a bug then please open a ticket for it in the JIRA:
https://luceeserver.atlassian.net/secure/Dashboard.jspa


Igal Sapir
Lucee Core Developer
Lucee.org

--
Love Lucee? Become a supporter and be part of the Lucee project today! - http://lucee.org/supporters/become-a-supporter.html
---
You received this message because you are subscribed to the Google Groups "Lucee" group.
To unsubscribe from this group and stop receiving emails from it, send an email to lucee+un...@googlegroups.com.
To post to this group, send email to lu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages