I'm trying to enable SSL with Tomcat's NIO connector.  Using SSL with the
HTTP connector works fine.  Using NIO without SSL works fine.  However, when
I combine the two, Tomcat starts to flake out when serving up any files that
are a little on the larger side (in my case, 1.6 MB).  The connection slows,
then stalls, then is eventually closed (I'm not sure if it's the client or
the server closing the connection.)  Here's my connector config:

    <Connector port="8443" address="my.ip.address"
            protocol="org.apache.coyote.http11.Http11NioProtocol"
            SSLEnabled="true"
            scheme="https" secure="true"
            clientAuth="false" sslProtocol="TLS"
            keystoreFile="/usr/local/jboss/server/default/conf/newstore.jks"
            keystorePass="xxx"
            keyAlias="tomcat"/>

Here's an example of what happens using wget:

HTTP request sent, awaiting response... 200 OK
Length: 1,646,640 (1.6M) [application/x-shockwave-flash]
75% [==========================================>               ]
1,238,283     --.--K/s    ETA 00:20
22:20:56 (19.58 KB/s) - Connection closed at byte 1238283. Retrying.
HTTP request sent, awaiting response... 200 OK
Length: 1,646,640 (1.6M) [application/x-shockwave-flash]
36% [===================>                                      ]
1,038,639     --.--K/s    ETA 01:50
22:22:00 (16.28 KB/s) - Connection closed at byte 1238283. Retrying.
HTTP request sent, awaiting response... 200 OK
Length: 1,646,640 (1.6M) [application/x-shockwave-flash]
20% [==========>                                               ]
588,543       --.--K/s    ETA 02:17
22:22:39 (16.36 KB/s) - Connection closed at byte 1238283. Retrying.

and so on.  It doesn't always fail.  Maybe about half of the time.  And
removing this line:
            protocol="org.apache.coyote.http11.Http11NioProtocol"
from the connector config fixes the problem.  However, my app is using
Comet, so I need the NIO connector.

Any idea what's going on here, or how I might start to debug this?

Thanks.

--Tim

Reply via email to