tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dimitar Georgievski <mitk...@gmail.com>
Subject Re: Reuse mod ajp proxy connections
Date Wed, 19 Oct 2011 00:30:51 GMT
Hi Chris,

Tomcat AJP Connector settings:
<Connector port="${ajp.port}" protocol="AJP/1.3" redirectPort="${ssl.port}"
maxThreads="750" backlog="100"
enableLookups="false"
emptySessionPath="true" connectionTimeout="800000" URIEncoding="UTF-8" />


Apache MPM worker settings;

StartServers 3
ServerLimit 30
MaxClients 750
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0


Mod proxy settings in Apache
ProxyStatus On
ProxyRequests Off
ProxyTimeout 1800

ProxyPassMatch ^/(.*) ajp://localhost:8009/$1

SetEnv force-proxy-request-1.0 1
SetEnv proxy-nokeepalive 1

by monitoring Apache performance through stats provided by mod_status I've
noticed that the AJP TCP connection is always closed after Tomcat serves a
static resource like CSS, JavaScript, image or a JAR file

Thanks,

Dimitar

On Tue, Oct 18, 2011 at 3:40 PM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Dimitar,
>
> On 10/18/2011 2:15 PM, Dimitar Georgievski wrote:
> > We have a Tomcat 5.5.25 server connected to Apache 2.2.9 over
> > mod_ajp_proxy. Monitoring of the servers shows that AJP proxy
> > connections are not reused but closed and reopened. Frequent
> > closing of TCP connections leaves many connections in TIME_WAIT
> > state and this is something we would prefer to avoid if possible.
>
> AJP is intended to maintain persistent connections. Something must be
> going wrong or your configuration must be forcing such behavior.
>
> > My understanding of the *reuse* flag in AJP13_END_RESPONSE
> > structure is that this flag is hard coded and cannot be controlled
> > by configuration settings. I couldn't find any in Tomcat AJP
> > connector configuration that could do that.
> >
> > Since Tomcat is sending the response, is there any way to control
> > the reuse of AJP TCP connection through Tomcat configuration? I
> > hope I don't have to resort to editing and recompilation of the
> > mod_ajp_proxy module :-)
>
> Can you post your AJP <Connector> settings from conf/server.xml as
> well as your mod_proxy_ajp configuration as well?
>
> - -chris
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (MingW32)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk6d1iEACgkQ9CaO5/Lv0PCnGgCcCmrD69wV7EAdj3qMbuMC3pZz
> jmQAn3X6C9buUoCS7SwCDHIR6HzJqGVY
> =HWpj
> -----END PGP SIGNATURE-----
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

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