Tomcat – Jboss unreachable/ slow behind apache with ajp

apache-2.2jbossmod-proxy-ajpreverse-proxytomcat

I have an linux server running with a JBoss Instance with apache2.
Apache2 will use AJP connection to reverse proxy to JBoss.

I found these messages in the apache error.log:

[error] (70007)The timeout specified has expired: ajp_ilink_receive() can't receive header
[error] ajp_read_header: ajp_ilink_receive failed
[error] (120006)APR does not understand this error code: proxy: read response failed from 8.8.8.8:8009 (hostname)
[error] (111)Connection refused: proxy: AJP: attempt to connect to 8.8.8.8:8009 (hostname) failed
[error] ap_proxy_connect_backend disabling worker for (hostname)
[error] proxy: AJP: failed to make connection to backend: hostname
[error] proxy: AJP: disabled connection for (hostname)25

I googled around but I can't seem to find any related topics.
There are people say this behavior can be caused by misconfigured apache vs jboss.
Telling the max amount of connections apache allows are far greater then jboss, causing the apache connection to time out.

But I know the app isn't used by thousands of simultaneous connections at the time not even hundreds of connections so I don't believe this could be a cause.

Does anybody have an idea? Or could tell me how to debug this problem?

I'm using these versions:

  • Debian 4.3.5-4 64Bit
  • Apache Version 2.2.16
  • JBOSS Version 4.2.3.GA

Thanks

Best Answer

4.2.3 jboss, you should increase the amount of ajp connections that you can allow in server.xml. if that is not set, the default is 40, which is too low. Up that to 20% higher than your current amount of max connections. If you have hundreds of simutanious connections, set it to 512 and monitor it using the status console.