bugzilla | 24 Apr 13:53 2012
Picon

DO NOT REPLY [Bug 53138] New: Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

             Bug #: 53138
           Summary: Not able to download a file size of 740KB using NIO
                    connector in tomcat version 7.0.27. But with the same
                    configuration I was able to download that in tomcat
                    7.0.26.
           Product: Tomcat 7
           Version: 7.0.27
          Platform: PC
            Status: NEW
          Severity: blocker
          Priority: P2
         Component: Connectors
        AssignedTo: dev <at> tomcat.apache.org
        ReportedBy: cprakas <at> gmail.com
    Classification: Unclassified

We have an application that uses a java script file of size around 700Kb that
will be downloaded as part of the client. The connector used was NIO . All
these days we did not see any issue till Tomcat 7.0.26.

When we upgraded it to the latest Tomcat version 7.0.27 we started getting this
problem. The file is never getting downloaded the connection will be broken in
middle. 

And we used fiddler to see what is happening and it gives us a message as below

“Content-Length mismatch: Response Header indicated 757,692 bytes, but server
sent 262,142 bytes.”
(Continue reading)

bugzilla | 24 Apr 14:01 2012
Picon

DO NOT REPLY [Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

--- Comment #1 from prakash <cprakas <at> gmail.com> 2012-04-24 12:01:29 UTC ---
Created attachment 28666
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=28666
Sample app to reproduce this issue

This app is to reproduce the issue.

--

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
bugzilla | 2 May 17:47 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

Robert Kish <robert.kish <at> ncogroup.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robert.kish <at> ncogroup.com

--

-- 
You are receiving this mail because:
You are the assignee for the bug.
bugzilla | 2 May 17:52 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

--- Comment #2 from Robert Kish <robert.kish <at> ncogroup.com> ---
I am having the same problem with my application. We have noticed only some
files are not downloading, not all of them - there's no apparent pattern to the
file size. We had one file that's 115397 download, but another that's 111158
fail.

What made it interesting was that the file did not download in IE 8, but the
file did download in FF 12. This leads me to believe it's something browser
specific about downloading the file. My searches led me to an item for 7.0.27,
https://issues.apache.org/bugzilla/show_bug.cgi?id=52858
that looked interesting. Perhaps the issue relates to that change.

--

-- 
You are receiving this mail because:
You are the assignee for the bug.
bugzilla | 2 May 18:46 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

Filip Hanik <fhanik <at> apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #3 from Filip Hanik <fhanik <at> apache.org> ---
Just ran the sample app on a 7.0.27 download

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
Accept-Ranges: bytes
ETag: W/"757692-1335976856000"
Last-Modified: Wed, 02 May 2012 16:40:56 GMT
Content-Type: application/javascript
Content-Length: 757692
Date: Wed, 02 May 2012 16:43:11 GMT

and then I get all the bytes. 

<Connector port="9880" 
           protocol="org.apache.coyote.http11.Http11NioProtocol" 
           maxThreads="150" 
           connectionTimeout="70000"
           acceptCount="100" 
           compression="on" 
           acceptorThreadCount="2" 
           redirectPort="8443"/> 
(Continue reading)

bugzilla | 2 May 18:49 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

--- Comment #4 from Filip Hanik <fhanik <at> apache.org> ---
Tested in 
Firefox 11 and Internet Explorer 9

--

-- 
You are receiving this mail because:
You are the assignee for the bug.
bugzilla | 2 May 22:02 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

--- Comment #5 from Robert Kish <robert.kish <at> ncogroup.com> ---
(In reply to comment #4)
> Tested in 
> Firefox 11 and Internet Explorer 9

Tomcat installation:

<Connector port="8081" protocol="org.apache.coyote.http11.Http11NioProtocol"
SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS"
keystoreFile="xxx/.keystore" keystorePass="xxx" keyPass="xxx"/>

Running on HPUX 11.11:

64 bit JVM

java version "1.6.0.14"
Java(TM) SE Runtime Environment (build 1.6.0.14-jinteg_07_mar_2012_00_45-b00)
Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-jre1.6.0.14-rc1b2 PA2.0W
(aCC_AP), mixed mode)

-------

On Windows XP,

Using IE 8, I get 114,688 bytes of the file. It takes a long time to download
the file after the first chunk of data. I'm guessing it just gives up and
(Continue reading)

bugzilla | 2 May 22:27 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

--- Comment #6 from Filip Hanik <fhanik <at> apache.org> ---
Thanks Robert, are you able to reproduce this on a non HPUX system with a more
recent runtime? ie, can you reproduce the attached test case on your local
laptop or workstation?

--

-- 
You are receiving this mail because:
You are the assignee for the bug.
bugzilla | 2 May 22:30 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

--- Comment #7 from Robert Kish <robert.kish <at> ncogroup.com> ---
(In reply to comment #6)
> Thanks Robert, are you able to reproduce this on a non HPUX system with a
> more recent runtime? ie, can you reproduce the attached test case on your
> local laptop or workstation?

Yes. I just finished testing this on my PC:
Windows XP SP 3

32 bit JVM

java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) Client VM (build 22.1-b02, mixed mode, sharing)

It worked on Tomcat 7.0.26. I installed 7.0.27, and it didn't work. I went back
to 7.0.26, and it works again.

--

-- 
You are receiving this mail because:
You are the assignee for the bug.
bugzilla | 2 May 23:06 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

--- Comment #8 from Filip Hanik <fhanik <at> apache.org> ---
Thanks Robert, I can reproduce it with IE 9 if I hit the "Save" option when I
hit refresh in the browser. I will check on this and see how it works out

--

-- 
You are receiving this mail because:
You are the assignee for the bug.
bugzilla | 2 May 23:46 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

--- Comment #9 from Filip Hanik <fhanik <at> apache.org> ---
In the meantime a workaround for this is to set useSendfile="false"

<Connector port="8081" protocol="org.apache.coyote.http11.Http11NioProtocol"
SSLEnabled="true"
               maxThreads="150" scheme="https" secure="true"
               clientAuth="false" sslProtocol="TLS"
keystoreFile="xxx/.keystore" keystorePass="xxx" keyPass="xxx"
useSendfile="false"/>

--

-- 
You are receiving this mail because:
You are the assignee for the bug.
bugzilla | 2 May 23:49 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

--- Comment #10 from Filip Hanik <fhanik <at> apache.org> ---
Current suspect is:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/util/net/NioEndpoint.java?r1=1300872&r2=1300950&diff_format=h

--

-- 
You are receiving this mail because:
You are the assignee for the bug.
bugzilla | 8 May 16:28 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

--- Comment #11 from Filip Hanik <fhanik <at> apache.org> ---
(In reply to comment #10)
> Current suspect is:
> http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/
> util/net/NioEndpoint.java?r1=1300872&r2=1300950&diff_format=h

Confirmed that the above check in broke sendFile for NIO. Current workaround is
useSendfile="false" on the NIO connector

--

-- 
You are receiving this mail because:
You are the assignee for the bug.
bugzilla | 18 May 21:30 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

Filip Hanik <fhanik <at> apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEEDINFO                    |RESOLVED
         Resolution|---                         |FIXED

--- Comment #12 from Filip Hanik <fhanik <at> apache.org> ---
Fixed in trunk in r1340215
Fixed in 7.0.x in r1340218
Will be available in 7.0.28

--

-- 
You are receiving this mail because:
You are the assignee for the bug.
bugzilla | 30 May 19:43 2012
Picon

[Bug 53138] Not able to download a file size of 740KB using NIO connector in tomcat version 7.0.27. But with the same configuration I was able to download that in tomcat 7.0.26.

https://issues.apache.org/bugzilla/show_bug.cgi?id=53138

Filip Hanik <fhanik <at> apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |a123856 <at> mail.ru

--- Comment #13 from Filip Hanik <fhanik <at> apache.org> ---
*** Bug 53331 has been marked as a duplicate of this bug. ***

--

-- 
You are receiving this mail because:
You are the assignee for the bug.

Gmane