Summary: | Documented AJP Connector configuration for pending request queue size in error | ||
---|---|---|---|
Product: | Tomcat 5 | Reporter: | James McClure <jmcclure> |
Component: | Connector:AJP | Assignee: | Tomcat Developers Mailing List <dev> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andrew.adamov |
Priority: | P2 | ||
Version: | 5.5.9 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | Linux | ||
URL: | http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html | ||
Attachments: | Patch against svn tomcat/connectors/trunk |
Description
James McClure
2006-01-20 16:35:56 UTC
Are you sure you were using the AJP connector class? Looking at the current code (which may have changed since you reported this issue), backlog is the right parameter, acceptCount is outdated, so the documentation seems OK. I have the same problem with Tomcat 5.5.20. It looks like the JK handler ignores both backlog and acceptCount parameters, and always uses the default value (50) for the socket listen queue size: <Connector address="10.225.96.83" port="11001" maxThreads="800" minSpareThreads="10" maxSpareThreads="100" connectionTimeout="30000" backlog="100" acceptCount="100" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /> strace: socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 29 bind(29, {sa_family=AF_INET6, sin6_port=htons(11001), inet_pton (AF_INET6, "::ffff:10.225.96.83", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0 listen(29, 50) = 0 The HTTP handler uses acceptCount value, as expected: <Connector address="10.225.96.83" port="11000" maxHttpHeaderSize="8192" maxThreads="800" minSpareThreads="10" maxSpareThreads="100" connectionTimeout="30000" acceptCount="100" enableLookups="false" redirectPort="8443" disableUploadTimeout="true" /> strace: socket(PF_INET6, SOCK_STREAM, IPPROTO_IP) = 10 bind(10, {sa_family=AF_INET6, sin6_port=htons(11000), inet_pton (AF_INET6, "::ffff:10.225.96.83", &sin6_addr), sin6_flowinfo=0, sin6_scope_id=0}, 28) = 0 listen(10, 100) = 0 "acceptCount" will be replaced with "backlog" by org.apache.catalina.connector.Connector class. Those attributes are same. (In reply to comment #2) > I have the same problem with Tomcat 5.5.20. > > It looks like the JK handler ignores both backlog and acceptCount parameters, > and always uses the default value (50) for the socket listen queue size: I have confirmed this behavior. It is org.apache.jk.common.ChannelSocket class, a part of Pure Java (Non-APR) AJP Connector. The class has empty setBacklog(int i) method and always uses 0 for ServerSocket backlog (0 means to use OS default value). Created attachment 19365 [details]
Patch against svn tomcat/connectors/trunk
Those documents say the default value of backlog (acceptCount) is 10, but the actual default value is 100(see *Endpoint.java). I think it seems documentation errors. If 100 is correct value, please don't forget to change the default backlog value included my patch. http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html http://tomcat.apache.org/tomcat-5.5-doc/config/http.html Done - Committed revision 493480. Many thanks Peter |