You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by baba smith <ju...@gmail.com> on 2012/01/30 18:18:15 UTC

Tomcat7 and Apache2 connection configuration (mod_proxy_ajp)

hi
i'm trying to connect apache 2 with tomcat 7 with a mod_proxy_ajp connector.
my question is: what is the relation of the tomcat server.xml connector
configuration and the apache httpd.conf?
for example, for the connector in the server.xml i can configure all kind of
timeouts and threads and connections. should these configurations be
correlated with those of the apace (like worker.c and prefork.c)?
how can i avoid from accepting in the apache more clients than the tomcat is
configured to?

thanks in advance,
baba

--
View this message in context: http://tomcat.10.n6.nabble.com/Tomcat7-and-Apache2-connection-configuration-mod-proxy-ajp-tp4351330p4351330.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat7 and Apache2 connection configuration (mod_proxy_ajp)

Posted by André Warnier <aw...@ice-sa.com>.
Pid * wrote:
> On 31 Jan 2012, at 06:59, baba smith <ju...@gmail.com> wrote:
> 
>> the problem that i'm trying to fix is that after a while that apache and
>> tomcat work together, the tomcat stops responding to the apache.
>> it looks like the connector itself stops working.
>>
>> the errors i see in the apach log  are:
>> "(70007)The timeout specified has expired: ajp_ilink_receive() can't receive
>> header"
>> "ajp_read_header: ajp_ilink_receive failed"
>> "(120006)APR does not understand this error code: proxy: read response
>> failed from 127.0.0.1:9005 (localhost)")
>>
>> do you know these errors? i'm pretty new to apache and tomcat so i thought
>> to start investigating by checking the configurations. i found lots of
>> documentation and yet nothing about the correlation/relation between the
>> apache
>> config and the tomcat config.

> 
> Perhaps you can provide the information produced by the version.bat or
> .sh script in Tomcat/bin.
> 
> (put your answer here)
> 
> The exact versions of HTTPD and details about the connector you are
> using would also be useful.
> 
> (put your answer here)
> 
> 
> p
> 

In addition to what Pid is asking for, and to give us a rough idea of the context :
How many requests are forwarded by Apache to Tomcat : 1 per minute, 1 per second, 10 per 
second, 100 per second, 1000 per second ?
And on average, how much time does Tomcat need to process one request ? milliseconds, 
seconds, minutes ?


To answer your question more broadly : there does not seem to exist a lot of documentation 
about mod_proxy_ajp.  And/or, maybe the documentation page that exists is complete, and 
there simply are no other parameters to adjust.

The following is just a personal guess :
mod_proxy_ajp uses the same AJP protocol as the other Apache/AJP connector (mod_jk).
mod_jk provides a lot of parameters to fine-tune its configuration.
mod_proxy_ajp apparently does not.
But also, mod_jk seems to be able to adjust its configuration automatically by default, in 
function of the corresponding Tomcat AJP Connector.  So I guess that it must be able to 
find out the Tomcat Connector configuration through the AJP interface with that Connector.
And since mod_proxy_ajp uses the same protocol, maybe it uses the same functionality to 
also set itself up automatically.
Again, just a guess..

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat7 and Apache2 connection configuration (mod_proxy_ajp)

Posted by Pid * <pi...@pidster.com>.
On 31 Jan 2012, at 06:59, baba smith <ju...@gmail.com> wrote:

> the problem that i'm trying to fix is that after a while that apache and
> tomcat work together, the tomcat stops responding to the apache.
> it looks like the connector itself stops working.
>
> the errors i see in the apach log  are:
> "(70007)The timeout specified has expired: ajp_ilink_receive() can't receive
> header"
> "ajp_read_header: ajp_ilink_receive failed"
> "(120006)APR does not understand this error code: proxy: read response
> failed from 127.0.0.1:9005 (localhost)")
>
> do you know these errors? i'm pretty new to apache and tomcat so i thought
> to start investigating by checking the configurations. i found lots of
> documentation and yet nothing about the correlation/relation between the
> apache
> config and the tomcat config.

Perhaps you can provide the information produced by the version.bat or
.sh script in Tomcat/bin.

(put your answer here)

The exact versions of HTTPD and details about the connector you are
using would also be useful.

(put your answer here)


p

> thanks,
> baba
>
>
>
> --
> View this message in context: http://tomcat.10.n6.nabble.com/Tomcat7-and-Apache2-connection-configuration-mod-proxy-ajp-tp4351330p4352703.html
> Sent from the Tomcat - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat7 and Apache2 connection configuration (mod_proxy_ajp)

Posted by baba smith <ju...@gmail.com>.
the problem that i'm trying to fix is that after a while that apache and 
tomcat work together, the tomcat stops responding to the apache. 
it looks like the connector itself stops working. 

the errors i see in the apach log  are:
"(70007)The timeout specified has expired: ajp_ilink_receive() can't receive
header"
"ajp_read_header: ajp_ilink_receive failed"
"(120006)APR does not understand this error code: proxy: read response
failed from 127.0.0.1:9005 (localhost)")

do you know these errors? i'm pretty new to apache and tomcat so i thought 
to start investigating by checking the configurations. i found lots of 
documentation and yet nothing about the correlation/relation between the
apache 
config and the tomcat config.

thanks,
baba



--
View this message in context: http://tomcat.10.n6.nabble.com/Tomcat7-and-Apache2-connection-configuration-mod-proxy-ajp-tp4351330p4352703.html
Sent from the Tomcat - User mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tomcat7 and Apache2 connection configuration (mod_proxy_ajp)

Posted by André Warnier <aw...@ice-sa.com>.
baba smith wrote:
> hi
> i'm trying to connect apache 2 with tomcat 7 with a mod_proxy_ajp connector.
> my question is: what is the relation of the tomcat server.xml connector
> configuration and the apache httpd.conf?
> for example, for the connector in the server.xml i can configure all kind of
> timeouts and threads and connections. should these configurations be
> correlated with those of the apace (like worker.c and prefork.c)?
> how can i avoid from accepting in the apache more clients than the tomcat is
> configured to?
> 
That is a very complex matter.
The simple response is : don't touch them.
Meaning : do not specify any of those things, and leave them to their default values, 
which are usually sensible and chosen by people who know what they are doing, to cover the 
most usual needs.
And if you start modifying the defaults (to correct a real problem, which you will have 
surely measured first), then modify one setting at a time, making sure that you have read 
the on-line documentation about that setting first of all.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org