From: tslow on 5 Sep 2007 18:17 I cannot get <cfflush> to work on a CF8 server. I am doing a simple cfoutput, running a cfx sleep tag, and then outputing 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 on 6 Sep 2007 16:27 I did a little more research and it seems that it CF8 only flushes when there is a lot of text to push. Specifically, it needs 73729 characters 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 don't use <cfflush> very often, but when we do, we want the browser to know that we are still processing a page and that it shouldn't 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 doesn't 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 on 7 Sep 2007 09:47 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 CF. With IE, the buffering occurred (IE buffering), but when I used FireFox with the CF built-in web server, no buffering and flushing worked as expected, multiple refreshes as well and still no cfflush problems with the built-in CF 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 on 7 Sep 2007 10:39 To be clear, ColdFusion 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 ColdFusion 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 do not interfere with cfflush.
From: tslow on 7 Sep 2007 11:24 The reason why I think that this is a CF 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 don't think that will give me anything because these two machines are identical besides the coldfusion 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 have a specific backend need that cannot handle javascript. And pushing 73729 at a time seems a little ridiculous (but I guess possible). Thanks, Tim
|
Next
|
Last
Pages: 1 2 Prev: CFHTTP Error Next: cfldap "LDAP: error code 12 - Sort Response Control" |