Change in behavior for Connector maxKeepAliveRequests in 7.0.21+

2011-11-16 Thread Ryan Morgan

Hey everyone,

As part of the HTTP connector refactoring that occurred in 7.0.21 (see 
http://svn.apache.org/viewvc?diff_format=h&view=revision&revision=1158367) the 
Connector behavior has changed when maxKeepAliveRequests is set to 0.  In 
Tomcat 7.0.20 and earlier, a setting of 0 would disable keepalives for the 
connector.  In 7.0.21 an up, it's enabled and from what I can tell, set to 
infinite.

Was this change intended?  From looking at the documentation, the updated code 
is correct as a value of 0 is not mentioned.  However, this could cause issues 
for servers that have maxKeepAliveRequests mis-configured to 0 and upgrade to 
7.0.21+

Thoughts?

-Ryan

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



Re: Change in behavior for Connector maxKeepAliveRequests in 7.0.21+

2011-11-17 Thread Ryan Morgan


- Original Message -
| From: "Konstantin Kolinko" 
| To: "Tomcat Developers List" 
| Sent: Thursday, November 17, 2011 1:00:45 AM
| Subject: Re: Change in behavior for Connector maxKeepAliveRequests in 7.0.21+
| 
| 2011/11/17 Ryan Morgan :
| >
| > Hey everyone,
| >
| > As part of the HTTP connector refactoring that occurred in 7.0.21
| > (see
| > http://svn.apache.org/viewvc?diff_format=h&view=revision&revision=1158367)
| > the Connector behavior has changed when maxKeepAliveRequests is
| > set to 0.  In Tomcat 7.0.20 and earlier, a setting of 0 would
| > disable keepalives for the connector.  In 7.0.21 an up, it's
| > enabled and from what I can tell, set to infinite.
| >
| > Was this change intended?  From looking at the documentation, the
| > updated code is correct as a value of 0 is not mentioned.
| >  However, this could cause issues for servers that have
| > maxKeepAliveRequests mis-configured to 0 and upgrade to 7.0.21+
| 
| Just a quick look at Tomcat 6.0 documentation (config/http.html)
| reveals that it does not document the value of "0" either. That
| specific sentence in Tomcat 6.0 docs was not updated since r420006
| when TC6 development started (5 years ago). So I do not see any
| problem here.
| 
| The documented values are -1 for infinity, 1 for disable, 100 by
| default.
| 
| The intent of commits around r1158367 was to align implementations
| between connectors. It might be that some of them (Bio vs Nio vs Apr)
| treated "0" differently.
| 

Hi Konstantin,

Thanks for the reply - I only noticed this change in behavior for the Bio 
connector.  I just wanted to make sure this wasn't something that was 
overlooked as part of that change.

Cheers,
-Ryan




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