tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bajbutovic, Zoran" <>
Subject RE: Apache/Tomcat - mod_jk can't receive response from Tomcat
Date Mon, 14 Jul 2008 22:17:08 GMT


We have Apache and Tomcat running on different servers, using mod_jk. 
>From time to time we got the following errors from Tomcat.

		[Thu Jul 10 16:43:21 2008]  [jk_ajp_common.c (1250)]:
Tomcat is down or network problems. No response has been sent to the
client (yet)
		[Thu Jul 10 16:43:21 2008]  [jk_ajp_common.c (1449)]:
ERROR: Receiving from tomcat failed, recoverable operation. err=0
		[Thu Jul 10 16:43:21 2008]  [jk_ajp_common.c (783)]:
ERROR: can't receive the response message from tomcat, network problems
or tomcat is down (
		:8009), err=-1
		[Thu Jul 10 16:43:21 2008]  [jk_ajp_common.c (1468)]:
sending request to tomcat failed in send loop. err=0

We were able to simulate the failure, and found out that Tomcat became
unresponsive once the number of threads reach 252. We double check all
our configuration settings but couldn't find anything wrong. Any help
will be greatly appreciated.

Here are our settings:

AJP connector:

I suggest setting maxThreads in TOMCAT_HOME/conf/server.xml for AJP
connector to slightly higher value than Apache's thread limit

Please see below maxThreads values in  our conf (I don't deleted the
comments lines) 

  <Connector protocol="AJP/1.3" port="8009" maxThreads="600"
minSpareThreads="5" maxSpareThreads="100" acceptCount="500" debug="0"
connectionTimeout="60000" enableLookups="false"
disableUploadTimeout="true" useURIValidationHack="false"
redirectPort="4443" />

MPM - we use prefork:

## Server-Pool Size Regulation (MPM specific)
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept
# MaxSpareServers: maximum number of server processes which are kept
# MaxClients: maximum number of server processes allowed to start
# MaxRequestsPerChild: maximum number of requests a server process

<IfModule prefork.c>
StartServers       8
MinSpareServers    5
MaxSpareServers   20
MaxClients       250
MaxRequestsPerChild  1000

# list the workers by name

# ------------------------
# First tomcat server
# ------------------------

# worker "app" use up to 10 sockets, which will stay no more than 10mn
in cache

# worker "app" ask operating system to send KEEP-ALIVE signal on the

# worker "app" want ajp13 connection to be dropped after 5mn == 300
(timeout), 10 min == 600

#This features has been added in jk 1.2.6 to avoid problem with hung

#forwarding to it a request. The parameter is the delay in milliseconds
to wait for the PONG reply.
#This features has been added in jk 1.2.6 to avoid problem with hung
# Specifies the load balance factor when used with
# a load balancing worker.
# Note:
#  ----> lbfactor must be > 0
#  ----> Low lbfactor means less work done by the worker.

Zoran Bajbutovic 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message