You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2014/03/24 13:36:02 UTC
svn commit: r1580823 - in /tomcat/tc7.0.x/trunk: ./
webapps/docs/changelog.xml webapps/docs/web-socket-howto.xml
Author: markt
Date: Mon Mar 24 12:36:02 2014
New Revision: 1580823
URL: http://svn.apache.org/r1580823
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56304
WebSocket + BIO HTTP + Production = bad idea
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1580658,1580821
Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1580823&r1=1580822&r2=1580823&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Mon Mar 24 12:36:02 2014
@@ -225,6 +225,10 @@
operation because the web application is already being serviced, report
an error rather than reporting success. (markt)
</fix>
+ <fix>
+ <bug>56304</bug>: Add a note to the documentation about not using
+ WebSocket with BIO HTTP in production. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Other">
Modified: tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml?rev=1580823&r1=1580822&r2=1580823&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/web-socket-howto.xml Mon Mar 24 12:36:02 2014
@@ -49,6 +49,24 @@
code</a>.</p>
</section>
+<section name="Production usage">
+<p>Although the WebSocket implementation does work with any of the HTTP
+connectors, it is not recommended to the WebSocket with the BIO HTTP connector
+as the typical uses of WebSocket (large numbers of mostly idle connections) is
+not a good fit for the HTTP BIO connector which requires that one thread is
+allocated per connection regardless of whether or not the connection is idle.
+</p>
+
+<p>It has been reported (<bug>56304</bug>) that Linux can take large numbers of
+minutes to report dropped connections. When using WebSocket with the BIO HTTP
+connector this can result in threads blocking on writes for this period. This is
+likely to be undesirable. The time taken for the connection to be reported as
+dropped can be reduced by using the kernel network parameter
+<code>/proc/sys/net/ipv4/tcp_retries2</code>. Alternatively, one of the other
+HTTP connectors may be used as they utilise non-blocking IO enabling Tomcat to
+implement its own timeout mechanism to handle these cases.</p>
+</section>
+
<section name="Tomcat WebSocket specific configuration">
<p>The JSR-356 Java WebSocket 1.0 implementation is only available when Tomcat
is running on Java 7 or later.</p>
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org