tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Tomcat mod_proxy_ajp and workers
Date Thu, 26 Jan 2012 13:07:54 GMT
baba smith wrote:
> hi,
> i'm pretty much confused about the workers issue.  
> my setup is an apache server and a tomcat that are connected with a
> mode_proxy_ajp connector.
> the porblem is that some time after that both are working, the tomcat stops
> responding to apache. the errors that i see in the apache are:
> 1. (70007)The timeout specified has expired: ajp_ilink_receive() can't
> receive header
> 2. ajp_read_header: ajp_ilink_receive failed
> 3. (120006)APR does not understand this error code: proxy: read response
> failed from (localhost)
> i tries to figure that out reading many posts and i got the idea that maybe
> the apache is configured with more workers than the tomcat and that it
> causes the apache to time out.
> so i looked for the workers configuration and actually i couldnt find any
> workers properties file in neither of the servers. (apache 2.2.15 and tomcat
> 7, were installed by someone else a couple of months ago). 
> is there a default configuration that takes place when there is no
> properties file for the workers?
> the closest thing that i found is in the httpd.conf file of the apache and
> it says:
> <IfModule worker.c>
>    StartServers         4
>    MaxClients         300
>    MinSpareThreads     25
>    MaxSpareThreads     75 
>    ThreadsPerChild     25
>    MaxRequestsPerChild  0
> </IfModule>
> whats that?

It does indeed look like you are a bit confused.  But it is nothing to be ashamed about, 
as the situation is a bit confusing to start with.

One thing at a time..

First, the "<IfModule worker.c>" section above, has nothing to do with the 
Apache-httpd/Apache-Tomcat connection (or at least not directly).  It is just by an 
unfortunate coincidence that the word "worker" is used for different things in more than 
one context.

Second, as far as I know, the term (and file) "" is something used 
within the context of the "mod_jk" Apache-httpd/Apache-Tomcat connector.
But you seem to be using "mod_proxy" and "mod_proxy_ajp" as an Apache-httpd/Apache-Tomcat

connector, so should not be relevant for you.

But just to verify this, in your Apache-httpd configuration file(s), do you see any 
directives like :

ProxyPass /someURL AJP://somehost:someport/someURL

and if yes, can you copy them here ?

Additional info :
There are 3 ways to connect Apache-httpd to Apache-Tomcat, in 2 sub-groups :

Subgroup 1 : via HTTP

schema :
browser <-- HTTP --> httpd + mod_proxy_http <-- HTTP --> Tomcat + HTTP <Connector>

Subgroup 2 : via AJP

schema :

a) browser <-- HTTP --> httpd + mod_proxy_ajp <-- AJP --> Tomcat + AJP <Connector>

The documentation for the mod_proxy_ajp module is here :
(but also see the documentation for mod_proxy)

b) browser <-- HTTP --> httpd + mod_jk <-- AJP --> Tomcat + AJP <Connector>

The documentation for mod_jk is mostly here :
"worker(s)" is a term used in the mod_jk documentation to talk about "a back-end Tomcat".
That term is not used in the mod_proxy_ajp documentation.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message