You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2008/01/10 14:02:30 UTC

DO NOT REPLY [Bug 44199] New: - expose current backlog queue size

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44199>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44199

           Summary: expose current backlog queue size
           Product: Tomcat 6
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Connectors
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: skibaa@gmail.com


I want to contribute a custom SocketFactory allowing to analyze the utilization
of acceptConnection attribute of a Connector. In a properly configured
production system, there should be rare situations where connections wait for a
worker thread to be handled. Our client complained on high latency of web
requests, but the measurement on servlet did not show high latency. So we wanted
to know the number of connections which wait in socket backlog and were not
accepted yet.

I solved this problem by writing a custom SocketFactory, which accepts
connections immediately and puts it in my queue until a call to accept() will
take them. So the number of waiting connections can be monitored via JMX.

To activate this factory, the declaration of the corresponding Connector in
server.xml should be changed like in the following example.

 <Connector port="8080" maxHttpHeaderSize="8192"
               maxThreads="10" minSpareThreads="5" maxSpareThreads="7"
               enableLookups="false" redirectPort="8443" acceptCount="10"
               connectionTimeout="2000" disableUploadTimeout="true"

              
socketFactory="org.apache.tomcat.util.net.BacklogMeasuringServerSocketFactory"/>


No changes in existing classes are required.

Please review the code in the attachment.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


DO NOT REPLY [Bug 44199] - expose current backlog queue size

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=44199>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=44199





------- Additional Comments From skibaa@gmail.com  2008-01-10 05:03 -------
Created an attachment (id=21373)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=21373&action=view)
contribution patch


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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