tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jess Holle <>
Subject Re: Serious non-native AJP connector issue
Date Fri, 15 Jun 2007 12:53:07 GMT

I just redid my tests with:

    BalancerMember ajp://localhost:8010 min=15 max=*50* smax=30 ttl=900
    keepalive=Off timeout=900


        <Connector port="8010"
                   minSpareThreads="15" maxSpareThreads="30"
    maxThreads="*51*" acceptCount="*0*"
    useBodyEncodingForURI="true" URIEncoding="UTF-8"
                   enableLookups="false" redirectPort="8443"
    protocol="AJP/1.3" />


    ab -n 100 -c *50*

I (after about 3 seconds) get

    SEVERE: All threads (51) are currently busy, waiting. Increase
    maxThreads (51) or check the servlet status

and I eventually get exactly 1 lost request.  I'm baffled as to why this 
can occur.

Something's still doesn't seem quite right here.

What's even weirder is that I only get this issue with the first ab run 
after restarting Tomcat.  If I do the same test again (any number of 
times) I don't lose any requests.

I can get the same result by restarting and doing 2 ab runs with "-n 
100" in fairly short secession, so this isn't some ab error.  By "fairly 
short", I don't mean very short -- I left a good 5 seconds between runs.

I find that using a max of 49 in Apache seems to work reliably, but I'm 
struggling to understand: (1) why I have to have 2 more Tomcat connector 
threads allowed than the number of connections I can possibly have and 
(2) whether "2" is always the safe buffer or whether I'll need 9 on an 8 
CPU box or some such.

Jess Holle

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message