You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2007/01/14 21:10:01 UTC

DO NOT REPLY [Bug 41361] New: - Content lost when read by a slow client.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41361>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41361

           Summary: Content lost when read by a slow client.
           Product: Tomcat 5
           Version: 5.5.20
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Servlet & JSP API
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: c.varney@alchemy.co.nz


Given the following servlet:

public class GreetingServlet extends HttpServlet
{
  public void doGet(HttpServletRequest request, HttpServletResponse response)
      throws ServletException, IOException
  {
    PrintWriter printWriter = response.getWriter();

    for (int i = 0; i < 10000; i++)
    {
      printWriter.println("Servlet test................ Line: " + i);

      if (printWriter.checkError())  // this causes a flush
      {
        System.err.println("An error occurred, " + i + " lines written.");
      }
    }

    printWriter.close();
  }
}



Only the first 4328 rows are available for the following client to read:

  public void testHTTPRead() throws Exception
  {

    URL url = new URL("http://localhost:/servlettest/test");
    URLConnection conn = url.openConnection();
    InputStream inputStream = conn.getInputStream();

    // Note these timings are sensitive - invoking inputStream.available()
    // each second for 50 times and all the content can be read.
    for (int i = 0; i < 5; i++)
    {
      System.out.println(inputStream.available());
      Thread.sleep(10000);
    }

    InputStreamReader inputStreamReader = new InputStreamReader(inputStream);
    BufferedReader in = new BufferedReader(inputStreamReader);

    String str;
    while ((str = in.readLine()) != null)
    {
      System.out.println(inputStream.available() + " " + str);
    }

  }


This may be related to bug 37627.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 41361] - Content lost when read by a slow client.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41361>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41361





------- Additional Comments From c.varney@alchemy.co.nz  2007-01-16 17:52 -------
Tomcat standalone.

Server Information in the Tomcat manager reports:

Tomcat Version:  Apache Tomcat/5.5.20
JVM Version:     1.5.0_04-b05
JVM Vendor:      Sun Microsystems Inc.
OS Name:         Windows XP
OS Version:      5.1
OS Architecture: x86

The problem also exists on our staging server:

Tomcat Version:  Apache Tomcat/5.5.20
JVM Version:     1.5.0_09-b03
JVM Vendor:      Sun Microsystems Inc.
OS Name:         Windows 2003
OS Version:      5.2
OS Architecture: x86

Both are vanilla installs of Tomcat.

No problems are encountered when deploying to Sun Java System Application Server
Platform Edition 9.0_01

Any other info I can provide?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 41361] - Content lost when read by a slow client.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41361>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41361





------- Additional Comments From chris@sourcelabs.com  2007-01-16 16:29 -------
Can you clarify the specifics of this issue a bit?  Are you seeing this issue
with just Tomcat standalone, or Tomcat in conjunction with Apache (or IIS)?

I'm not able to repro this using plain Tomcat 5.5.20 on JDK 1.5 running on both
Linux and Mac.  I used delay periods of 5, 10, 15, 20 and 30 seconds with total
delays of up to 120 seconds, and each test received the full output as expected.
 Sorry, I don't have a WinXP system to test on.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 41361] - Content lost when read by a slow client.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41361>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41361





------- Additional Comments From yoavs@computer.org  2007-03-25 09:26 -------
I also can't reproduce this on standalone Tomcat using default HTTP/1.1
connector on Windows XP.  

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 41361] - Content lost when read by a slow client.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41361>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41361





------- Additional Comments From chris@sourcelabs.com  2007-01-17 12:49 -------
RE #3 - that would certainly explain why I can't repro the issue on Linux or
MacOS...;-)

I'll see if I can get some time on a WinXP box to confirm the issue.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


DO NOT REPLY [Bug 41361] - Content lost when read by a slow client.

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41361>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41361


c.varney@alchemy.co.nz changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Servlet & JSP API           |Native:Integration




------- Additional Comments From c.varney@alchemy.co.nz  2007-01-17 11:17 -------
No content lost when testing against Tomcat without native support suggesting a
problem in tcnative-1.dll.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org