On 27.01.2009 21:24, Jim Goodspeed wrote:
I am seeing the following error in my HTTP Apache error_log. I think this
is OK (I assume the timeout has expired and that it will create a new
connection when it is needed), but I wanted a second opinion. We are having
a problem with some dropped connections and I think it is either network or
database related, but I want to eliminate the tomcat and apache setup to be
safe.
Thank you in advance for your help.
I have two web servers in front of two tomcat servers - 2.2.10 for the web
servers and 6.0.16 for the tomcat servers.
Error from apache error_log:
[Mon Jan 26 12:00:56 2009] [error] (70007)The timeout specified has expired:
proxy: AJP: attempt to connect to 10.222.4.30:55330 (
noandvtc02b.noandv.btbpo.net) failed
[Mon Jan 26 12:00:56 2009] [error] ap_proxy_connect_backend disabling worker
for (noandvtc02b.noandv.btbpo.net)
[Mon Jan 26 12:00:56 2009] [error] proxy: AJP: failed to make connection to
backend: noandvtc02b.noandv.btbpo.net
Those messages should not occur in a sane environment. They tell you,
that httpd was not able to connect to the backend (create a new
connection) before a timeout fired. If you didn't configure any special
timeout I think it is by default 300 seconds!
So either there's a network problem between the httpd server and
10.222.4.30, or all threads in your Tomcat at 10.222.4.30 were busy, so
Tomcat couldn't accept a new connection. In this case a thread dump
(kill -QUIT to the Tomcat process) would reveal in catalina.out, what
all those threads are doing.
My configuration is the following on apache:
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
<Proxy balancer://app>
BalancerMember ajp://server1:8009 route=app-a loadfactor=5
BalancerMember ajp://server2:8009 route=app-b loadfactor=5
</Proxy>
<Location />
ProxyPass balancer://app/ stickysession=JSESSIONID
</Location>
My AJP configuration on each tomcat server is below:
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009"
enableLookups="false" redirectPort="8468" debug="0"
maxThreads="200" minSpareThreads="10" maxSpareThreads="25"
acceptCount="100" connectionTimeout="20000"
protocol="AJP/1.3" />
connectionTimeout is a bit low, because usually you want to persist
connections in server to server communication a bit longer, even when
idle. But first you need to find out, why creating new connections fails
every now and then (changing the connectionTimeout decreases the
frequency with which you need to create new connections [good for your
problem] but also increases the amount of time threads inside Tomcat
will be held busy [bad for your problem]).
I have the following jvmRoutes defined on each tomcat server in the
server.xml file:
<Engine name="Catalina" defaultHost="localhost" debug="0" jvmRoute="app-a">
<Engine name="Catalina" defaultHost="localhost" debug="0" jvmRoute="app-b">
Regards,
Rainer
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org