In configuring my AJP13 connector between Tomcat 5.5.9 and Apache2 (on Red Hat Enterprise 3 with Java 1.5) I am finding that the attribute named "backlog" seems to have no affect, while the attribute named "acceptCount" does. In my original load/configuration testing for deployment I had copied existing Connector configuration in the server.xml file from other defined Connectors. These use the "acceptCount" attribute name to manipulate the size of the pending request queue size. However, the documentation for this same configuation specifies the use of "backlog", which does not appear to have an effect on performance. I have inquired the users group about this topic, but have had no reply. Since I am seeing a performance change using "acceptCount", I can only assume at this time that the documentation is in error. See http://tomcat.apache.org/tomcat-5.5-doc/config/ajp.html
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