CF8 CFFLUSH not working
8 Message(s) by 5 Author(s) originally posted in advanced cfml techniques
| From: tslow |
Date: Wednesday, September 05, 2007
|
I cannot get
<CFFLUSH> to work on a CF8
server . I am doing a simple cfoutput,
run ning a CFX
sleep tag , and then
output ing more
text with a cfoutput. On my
CF6.1 server (which is identical besides the
version of CF), this works
correctly. On the CF8 server, nothing is displayed until the whole page
finishes.
Both servers are running on
Windows 2003
IIS 6. I'm returning a large chunk
of text in both cfoutputs, so it's not the
browser complaining that there is
not enough text.
Thanks, Tim
| From: tslow |
Date: Thursday, September 06, 2007
|
I did a little more research and it seems that it CF8 only
flush es when there
is a lot of text to
push . Specifically, it needs 73729
character s before it
will push any data. This seems to be the same size that
<CFFLUSH interval=1>
uses. Is there a way to lower this number? Or is this due to a setting on my
server? We do not use
<CFFLUSH> very often, but when we do, we want the browser
to know that we are still
process ing a page and that it should not timeout.
Here's what I used to test this. On my server, if you lower the size of the
outputted text by one character, it does not flush for the first cfflush.
-Tim
<CFSET VARIABLES.longText = '<p>' & RepeatString("a", 73722) & '
</p>'>
<CFOUTPUT>#VARIABLES.longText#
</CFOUTPUT>
<CFFLUSH>
<CFSET sleep(2000)>
<CFOUTPUT>#VARIABLES.longText#
</CFOUTPUT>
<CFFLUSH>
<CFSET sleep(2000)>
<CFOUTPUT>#VARIABLES.longText#
</CFOUTPUT>
<CFFLUSH>
<CFOUTPUT>Length = #Len(VARIABLES.longText)#
</CFOUTPUT>
| From: c_wigginton |
Date: Friday, September 07, 2007
|
What browser and web server did you use for the test? IE as well as IIS
buffer
the content. I just tested your
code on CF8 in a multiserver configuration
with an IIS web server connector. Both
Firefox and IE experienced the same
buffering in that configuration.
I further tested the
file using the
built-in web server of
ColdFusion With IE, the
buffering occurred (IE buffering), but when I used FireFox with the ColdFusion built-in
web server, no buffering and flushing worked as expected, multiple refreshes as
well and still no CFFLUSH problems with the built-in ColdFusion web server and Firefox.
You might want to consider looking into a UI re-design for providing the user
status on a long process by delivering a quick layout and then through
periodic polling, grab an updated status of the process via AJAX.
| From: tomj |
Date: Friday, September 07, 2007
|
To be clear, Cold Fusion flushes its output buffer immediately when CFFLUSH is
called.
As pointed out in other postings, there is a lot of
software (j2ee server, web
server,
network and client) between Cold Fusion and the browser, so if you are
seeing delays, there are many places to look. My guess is the web server, as
we know JRun and Firefox don't interfere with cfflush.
| From: tslow |
Date: Friday, September 07, 2007
|
The reason why I think that this is a ColdFusion 8 specific issue is that I have a
development machine running two
virtual machines. They both are identical in
(almost) every way as one was cloned from the other. They both have Windows
2003, IIS 6, some DCOMs, and some asp code. The only difference is that one is
running CF6.1 and the other is running CF8.
I can run the code I posted (using cfx_sleep instead of sleep()) on both the
CF6 and CF8 machines. The CF6 machine flushes correctly -- I can lower it to
output only one character at a time and it flushes every time. With CF8, it
appears that this requires a minimum of 73729 characters for the buffer to
flush.
I can look more into IIS, but I do not think that will give me anything because
these two machines are identical besides the Cold Fusion installs. Does this
work with CF8 running on JRun? Perhaps there is something weird with the way
that CF8 interfaces with IIS?
As for taking a different coding approach, we use AJAX a lot for things like
this, but we've a specific backend need that cannot
handle JAVAscript. And
pushing 73729 at a time seems a little ridiculous (but I guess possible).
Thanks, Tim
| From: tslow |
Date: Tuesday, September 11, 2007
|
I have searched through all of the settings files that I could find for IIS and
CF8 and could not find anything that seemed related to this issue. The
buffering that c_wigginton suggested seems to only apply to asp (I tried it and
it does not work).
Do other configurations flush pages back to Firefox immediately upon
<CFFLUSH>
tag call? I'm only able to test CF8 Standard as the Server configuration on
top of IIS6. It'd be nice to know if the problem does lie somewhere with
my server's settings, although I have run out of things to try. Should I submit
a
bug to Adobe?
| From: pwenke |
Date: Friday, September 14, 2007
|
Has anyone found a
solution to this problem? Turning buffering off in IIS does
not work.
I have the following configurations, some where
<CFFLUSH> works and some where
it doesn't:
CF7 on IIS6 - works
CF8 on IIS6 - doesn't work
CF8 on IIS7 - doesn't work
CF8 on Apache2 - works
The
box I have with CF8 on IIS6 was just upgraded from CF7 to CF8. No code
changes, no IIS changes, only ColdFusion It worked before; it's
broken now.
On a side note,
<CFFLUSH> doesn't work with some configurations of IIS
compression.
Thanks,
Pat
| From: bear1 |
Date: Thursday, October 25, 2007
|
I have the same problem. Installed ColdFusion 8 on a Windows 2003 server running IIS
and the CFFLUSH tag no longer works. On an identical (as far as I know) server
running CF 7, it works fine.
If I provide a
comment with the number of characters specified by tslow above
then it works. I also have this same problem on a cf8 development installation
running on Vista.
Thanks
Chuck
Next Message: IE6 CFLAYOUT tabs and datefield bug
Blogs related to CF8 CFFLUSH not working
Re: cfflush in CF 8
On 8/27/07, Doug Arthur wrote: > I'm having this same problem in
CF8 only. I even tried the workarounds, but > doesn't work in IE or FireFox! > > The page does
not render until all page processing is complete. Any ideas?
...
cfflush in ColdFusion 8
I'm having this same problem in
CF8 only. I even tried the workarounds, but doesn't work in IE or FireFox! The page does
not render until all page processing is complete. Any ideas? Code:
...
cfflush in ColdFusion 8
First off - in CF8, you have a sleep() function. You don't need to make a java object. Outside of that, your code below worked fine for me. On 8/27/07, Doug Arthur wrote: > I'm having this same problem in CF8 only ...