On 16.05.2017 19:57, john.e.gr...@wellsfargo.com.INVALID wrote:
All,

I'm using Tomcat 7.0.75.

I cannot get my connection or thread count over 100 no matter how much load I throw at 
the server.  Currently I just have a dummy app deployed that doesn't do much except sleep 
for about 500ms and return a canned response.  Initially I had maxThreads=20 with no 
explicit maxConnections.  I could get the "current threads busy" metric to 20 
easily.  Then I raised it to 100 and was able to reach that number easily.  Additionally, 
netstat told me I had 100 incoming connections to port 5114.  However raising the 
maxThreads higher doesn't make any difference, nor does explicitly specifying 
maxConnections=200.  In either case, I can only get 100 busy threads and 100 active 
connections.  Once I reach that limit, the response times on the client start going up.  
The Tomcat server itself isn't stressed at all.  CPU and GC are low.  The client is on a 
different server in the same data center.

I'm not going through a load balancer.  I'm going directly to the connector 
below:


     <Connector port="5114"
         protocol="HTTP/1.1"
         SSLEnabled="true"
         maxConnections="200"
         maxThreads="200"
         maxKeepAliveRequests="100"
         keepAliveTimeout="10000"
         scheme="https"
         secure="true"
         clientAuth="true"
         sslProtocol="TLS"
         keystoreFile="/app/comp/myapp/certs/appcerttestkeystore"
         keystorePass="${keystore.password}"
         keyAlias="test"
         truststoreFile="/app/comp/myapp/certs/cacerts"
         truststorePass="${truststore.password}"
         allowUnsafeLegacyRenegotiation="false"
                 ciphers="blah blah blah"
         />


Hi.
I do not know with what you are testing (as a client).
But be aware of the following :

1) >          keepAliveTimeout="10000"
means 10 seconds.
It means that, after the last request which one particular client sends on its connection to Tomcat, and Tomcat has responded to it, Tomcat will keep that connection open for an additional 10 s., just waiting to see if that same client has anything more to request. Since you are not using an Executor, keeping the connection open will also mean keeping the corresponding Tomcat thread alive, also waiting. Only once this time is over, will Tomcat close this connection, and "recycle" the thread to serve another client connection. 2) there may be a limit in the server OS, as to how many connections a process can have open at the same time. If that limit is reached at some point, that may either crash the process that wants an additional one, or put it in some wait queue until one is available again. 3) when a client opens a connection to a server (or tries to), and the server process does not immediately respond to the "open connection" request, the TCP/IP stack on the server will place the connection-open request in a wait queue. The size of that queue is an adjustable TCP/IP parameter. From the client side, if its connection is not accepted immediately (but not rejected right away), the client will just wait, until it is accepted. There is usually a timeout for this also, on the client side.

Some combination of the above may explain what you see.



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

Reply via email to