After adding the APR library to the java.library.path [as described in http://tomcat.apache.org/tomcat-5.5-doc/apr.html], certain JSPs that produce a lot of output (but used to be served in under a second) are now very slow and produce incomplete output (after reloading a few times). Sometimes the header appears only after a few kilobytes of output, at which point the output is cut off... <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> ... Server: Apache-Coyote/1.1 X-Total-Results: 389 Content-Type: text/html;charset=UTF-8 Content-Language: en-US Content-Length: 22858 Date: Thu, 24 Nov 2005 08:41:56 GMT Any ideas what is going on here?
Created attachment 17031 [details] Test application
Nope, this JSP works fine for me. Another attempt ?
A bad bug report ... The header returned gave away you were using a large bufferSize (which BTW I consider an inefficient waste of memory), however.
I am using a Tomcat 5.5.12 default installation, and never set any "bufferSize" anywhere!? Do I need to change the default value?
It seems that the problem can't be reproduced on Windows. Perhaps I did something wrong during setup? I have apr-1.2.2 installed.
(In reply to comment #4) > I am using a Tomcat 5.5.12 default installation, and never set any "bufferSize" > anywhere!? Do I need to change the default value? Content-Length: 22858 proves you are using response.setBufferSize.
(In reply to comment #6) > Content-Length: 22858 proves you are using response.setBufferSize. Please have a look at the attached test application; it's a simple jsp page, no response.setBufferSize in sight!
Looks like this is still an issue with 5.5.15. Here is a further observation: The problem doesn't occur when connecting from the same machine, but only when connecting from a remote machine (tested Windows to Linux). Sample telnet session: GET /test/test.jspx HTTP/1.0 HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Content-Type: application/xhtml+xml;charset=UTF-8 Date: Thu, 23 Feb 2006 23:56:37 GMT Connection: close [snipped lots of data] This is a Connection to host lost. I've added autoFlush="true" and buffer="8kb" to the jsp:directive.page element (though I believe that's the default anyway), no effect. If someone can confirm that the same test page can be retrieved fine from their own installation (remotely), I'll try to dig deeper...
I have the same effect. Sometimes page is not loaded completely. Sometimes the same pages are loaded twice, means: Page is delivered let's say for 70% and then the complete response-content is delivered another time in the page. Effect: Double Response in page. Number of characters until the response is repeated(in my example case): 204613. The page is utf-8. Other cases were 221656, ... ----- Snip ------------ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html> <head> ........... dden_'].value='_ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd> <html> ........ ----- Snap ------------ We have a JSF/Hibernate application. Our environment: Linux(don't get the effect on windows); on Linux we have AJP/1.3 and apr1.2.2; tomcat version 5.5.20; Unfortunately the behaviour in our case is nondeterministic. :-( Seems to depend on loading time of jsp. The bigger the page the higher the possibility to get the strange behaviour.
Tested with: Apache Tomcat 5.5.20/tomcat-native-1.1.7 Linux dev17.qa.atl.jboss.com 2.6.9-42.0.2.ELsmp #1 SMP Thu Aug 17 17:57:31 EDT 2006 x86_64 x86_64 x86_64 GNU/Linux Client Windows XP over OpenVPN C:\>telnet Welcome to Microsoft Telnet Client Escape Character is 'CTRL+]' Microsoft Telnet> set logfile C:\telnet.log Log file : C:\telnet.log Client logging on Microsoft Telnet> o dev17 10080 GET /tomcat-bug/index.jspx HTTP/1.0 logfile contains: GET /tomcat-bug/index.jspx HTTP/1.0 HTTP/1.1 200 OK Server: Apache-Coyote/1.1 Set-Cookie: JSESSIONID=33BDEE522FC7C10FA33839458369DDB6; Path=/tomcat-bug Content-Type: application/xhtml+xml;charset=UTF-8 Date: Thu, 16 Nov 2006 17:28:12 GMT Connection: close <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1 .0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns=" http://www.w3.org/1999/xhtml"><head><title>Test</title></head><body><p>This is a .... 98</li><li>This is a list item 999</li><li>This is a list item 1000</li></ul></b ody></html> So everything works just fine. Please test with the Tomcat 5.5.20 and Tomcat-Native 1.1.7
As recommended we have tested things with Tomcat 5.5.20, Tomcat-Native 1.1.7 and also updated apr to 1.2.7. Unfortunately things are NOT resolved. We still got the strange behaviour as described below. For getting things working we are running currently without native support: no problems so far... If there are any magic options for getting debug information you need, let me know.
Given the trouble we have had re-producing this, could you test with 5.5.27 and tc-native 1.1.16 in case one of the many fixes since 5.5.20 and 1.1.7 has fixed this.
Given the lack of activity, I am going to assume that this has been fixed in later tcnative versions. It certainly sounds like some of the issues seen in earlier releases. As always, if you still see this issue with the latest stable releases then please re-open and provide the steps to reproduce.