I have an apache sitting in front of two tomcat app servers(one on the same physical server, the other on a different one) that does time consuming work(0.5 sec to 10sec per request). The apache http server is getting killed by an average of 1 to 2 concurrent requests per second. both Server spec is about 2GB of RAM. Is there a way to optimize apache to handle the load? any advise is welcome.



BalancerMember ajp://localhost:8009/xxxxxx
BalancerMember ajp://XXX.XX.XXX.XX:8009/xxxxxx

I keep getting the following in apache2.2 log:

[Mon Dec 28 00:31:02 2009] [error] ajp_read_header: ajp_ilink_receive failed
[Mon Dec 28 00:31:02 2009] [error] (120006)APR does not understand this error code: proxy: read response failed from 127.0.0.1:8009 (localhost)

link|improve this question

72% accept rate
1  
If you posted the relevant Apache config you have it may offer more assistance. BalancerMember in and of itself is not enough. Is this within a Proxy declaration and are you using RewriteRule, RedirectMatch or ProxyPass to direct to the context on the Tomcat instances – Jeremy Bouse Jan 28 '10 at 0:32
Yeah we really need to see more detail to assess the situation. – Corey S. Feb 10 '11 at 1:28
feedback

1 Answer

you could balance your load across the two servers. Try to give more load to the standalone tomcat. You'll find same examples here: http://httpd.apache.org/docs/2.2/mod/mod%5Fproxy.html#proxypass

The error message looks like your tomcat isn't giving back any response. Did you take a look at your tomcat logs? Perhaps the tomcats have some trouble and apache is keeping connections open. This could also be a source for apache givving up. Do you have mod_status installed on your apache? This could give you some additional hints.

Christian

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.