-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Pradeep,

On 5/23/14, 2:26 PM, pradeepgm wrote:
>> You have a blocking AJP connector (BIO) with maxThreads of 250. 
>> Therefore that connector can support a maximum of 250
>> connections. You have httpd with MaxClients 1536 and - since AJP
>> uses persistent connections - you have httpd trying to create up
>> to 1536 persistent connections. The first 250 attempts will be
>> fine. Attempt 251 are going to fail.
> 
> As I mentioned above this is our staging environment. We have 2
> apache httpd servers serving 8-10 tomcat applications. This is
> running fine for past 3-4 years with  Tomcat 6. We have upgraded
> one of those 10 applications into Tomcat 7 and now we are facing
> this Tomcat hung state on that 7.x instance.

That doesn't necessarily mean that the upgrade to Tomcat 7 is to
blame. You may not have replicated your production environment
properly. These types of systems are very chaotic.

> At a high level is there any direct relationship between maxThread
> from Tomcat with  ServerLimit and MaxClients from httpd.

Yes. Yes there is. Hint: it's a mathematical relationship.

> Assume that we configure 250 maxThread for all those 10 Tomcat
> instances, what will be the ideal value for ServerLimit and
> MaxClients? Is it like 250 X 10?

You are asking the question the wrong way. What you need to ask is how
many connections you need on the Tomcat side given the number of
connections you are trying to support on the httpd side.

Remember the following:

1. AJP connections are persistent and have a read-timeout. Re-read
Mark's message until you understand this.

2. Each httpd instance has its own set of workers (by whatever name:
prefork, "worker", event, etc.).

3. Any httpd instance can potentially route a request to an Tomcat
instance. The number of httpd instances is significant in the equation.

4. On the Tomcat side, Thread == Connection for BIO, but not for NIO.

The math is easy. You just need to determine the right numbers to use
in it and you'll get the number you want.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBCAAGBQJTg4x3AAoJEBzwKT+lPKRYjPYQAMJReQRgxRzok0yeFmlUkkVI
5S+BZ0HDXBHZcjKqTB8twWFIGm9a4Ec93iQd6kyyeoiSzQsAcYbD4yc5p6UI2iq7
4gYmDjOLzIpcWD4ERggDZ+1Q22VSg3zKTrjxgTh3xm9xTAbMjPd9wZuwgrjPD/fi
OS0JVmopNlKbX36L8JU/y21HoG2HUAKXORuEsoMGqc/cbdwyuG6Ysht4EJMn7MS4
3ZIdS7I17WFpUw0fFKtmwQSIVLBwQMVZ/oI5XNs0v2ohnq4HKemy6Dxk9lDgT6bn
/tkeU8c5Dqbw0aUU8lgmPA5Upjci5g+752QlTLfUPyFXzPBN1eoXI37ITaYWKFap
b8KNQlSVM69Fgpqe/5SOlJrsF+81eHghCP4T9JAE0yfMJM/qy/1hxSAIV1aNEplv
2Nv2dWSswCLj/cQImU4fZE/6MLD8MfwTGSe+imdOhIHcmMxNIjckbr2ObSDwKkAn
wh0ACfp6sxqks3WiMOZMpygml67MZcvjgQXY639mrxB/sOUkgVzi2zFplRByg3Zx
gPfF5G8+NgzT3V5pICTEJLlYHmIJA0/fGYzQCKPpJ5Q+boNz0OmOaxoj3xONN0SC
wHtcM1aLR6/T2s6poZcrYH5Dq5+/kALIm7ZJkxNQ+wdrWlGBJ1oAGoy4mMlAMX6J
GBKvryuksncEEzQ7BPr/
=6/NN
-----END PGP SIGNATURE-----

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

Reply via email to