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

Frederik,

On 3/18/14, 10:22 PM, Frederik Nosi wrote:
> Each apache httpd talks with every tomcat.
> 
> mod_jk is configured with load balancing by business, sticky 
> sessions, only one try for ajp worker (so if it's busy i dont add 
> more stuff to the poor worker) and only 1 retry for all load
> balanced workers, in short, here's the interesting part of my
> conf:
> 
> worker.worker_lb.balance_workers = w1, w2, w3, w4 sticky session
> on, sticky session force = off ecc

Could you post the whole configuration without editing?

> [...]
> 
> 
> 
> Now, even with this settings, on peak times i have an
> amplification effect, all tomcats are busy, mod_jk reaches atimeout
> and retries again and again ... in a death spiral for the poor
> cats.
> 
> This behaviour brings me two problems:
> 
> 1) Even if apache httpd / mod_jk timeouts (read_timeout) from his
> side this does not stop the tomcat thread proccessing that request.
> It goes sometimes on and on but after all finishes the request. 
> This seems a resource waste, is there a way to let tomcat know
> that mod_jk droped the connection and stop proccessingthe dropped
> request? I tried to find a way to get this behaviour without
> success, so any suggestions are welcome.
> 
> 
> 2) I noticed that the default behaviour of load balanced workers
> and AJP workers is as follows:
> 
> a) ajp worker reaches retry_timeout, at this point retries again
> to the same worker once, thus amplifying load. This onewas easy to
> solve, just add a "worker.w1.retries = 1" and this does not happen
> anymore
> 
> b) Load balancer worker goes to the next ajp worker.. till the
> last one, than does another round of requests:
> 
> lb -> w1 -> timeout [...] lb-> w4 -> timeout
> 
> LB try 2 lb -> w1 -> timeout [...] request fails.
> 
> The second round to the workers IMHO is wasteful, but easy solved 
> with: "worker.worker_lb.retries = 1"
> 
> So at this point for every request all the busy tomcats get only
> one request. I tryed finding a way to tell the LB worker to try
> just once, only another worker for request but i didnt  find an
> option for doing this. Well, as i had an each to scratch i made a
> patch that adds an option to a LB worker telling how much times to
> retry before giving up, i'm glad to post it if somebody is 
> interested. Not sure it's perfect, but works for me.
> 
> 
> Now, my questions:
> 
> 1) Am i doing something wrong? 2) Is there a way to make a tomcat
> thread stop proccessing when AJP timeouts?

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

iQIcBAEBCAAGBQJTKZ5iAAoJEBzwKT+lPKRYeowQAJ1XufNZe0mc/DFwGHiIPYFK
4mqyVX00hjSwMQTSwxsTuFygiTMyTTgezsbg+EkoiDdMFtMKVRt3QZpXzCAWOthr
DWYSGcnnEONDcjWv4WMaPZ8cCnT4NCh/0FmAjbCAcVv+RiJBeoOEuNuIDX4DkS71
+4HmvUB9KwQGrSnAmtS17gA6Wauf4jW0QVe/yS642Kxv+1njFFp+n0Ezx8DnzJQr
VyRaKC7ITQTiAMbgHoYUOq+7Nwy1wOfRiwkfvWY8WNdJ1xOZJsicu5wnU1i4RDkp
rpUvhMvMJjvqO6waHO8HYcqoAhakOPBclTDpD24JuMlL5fJJVOMiFhD4iRp83tGr
X+FxMHZBTMlVhsz7ve+gQniy9zAvsTMJi5JMSkMO04WHRuqzY6dd4Iw7vrSm+LIQ
JfTUOS2Bv1NXv4MOwBCdwndQLftPDDmi1TVgFuoJH8BmeZPKqoLyGKbsOpIQkYFz
aZHtSViccTcNXQwQLl0pk9UVbYzGiRT4LdLFqRGEtq1yRdU7X3H9wuKkbQmRVrFe
Ou0xnx5/LF7RZ2cpeVnV5stZGTlTlnrlmkRX++78kplvoo7RRLP6J8A5Xmxk9zbN
Z8d8JWkNkoy1lbQr9tPaSR5A77qjwBChl3L6Elq7Gc3B1JV8SNJs8Pxau0uSm3dI
gSnf9kDocRm8ta6Ykgck
=PCNV
-----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