httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: [users@httpd] 503 status seems to get cached - how do I disable caching?
Date Mon, 08 Jun 2009 18:13:43 GMT
Jenny Brown wrote:
> On Mon, Jun 8, 2009 at 12:50 PM, Jenny Brown<> wrote:
>>> What you should really try, is to use the browser to access that same URL
>>> directly on Tomcat, without going through Apache, and see how long you have
>>> to wait there to get an answer after you start Tomcat.
>> Hitting tomcat directly on port 8080 is very fast.  That difference in
>> speed is what led me to believe that apache seemed to be caching.
> To clarify this a bit:
> In a single web browser, I can load
> in tomcat and see results,
> and load in another window
> (routes through apache, then ajp to tomcat) and see 503 -- at the same
> time.
> That is, tomcat is up, the manager web app is answering requests, and
> I can interact with it normally, for a significant amount of time,
> while apache continues to say it can't get to it.
Allright, so you have done your testing properly.  I just wanted to make 
sure you were looking at the right issue (I've had webapps that took 10 
minutes to get ready to process requests).

And you are using mod_proxy_ajp as a connector, with which I am not 
familiar, so I'll just dream up a scenario for the issue, and maybe a 
specialist can tell us if I'm wrong.

Let's imagine that there is a limited pool of mod_proxy_ajp threads or 
processes that can potentially forward requests to Tomcat.  Say there 
are 15 of them, no more.
Now 15 requests are issued to Apache at the same time, which should get 
proxied to Tomcat.  Each request is processed by one of the 
mod_proxy_ajp threads, they all set up a connection to Tomcat, and send 
their request.
Next, Tomcat goes down.  The ajp threads are still waiting for a 
response.  They will keep waiting until some timeout occurs.
Now more requests arrive in httpd, really for Tomcat.
But because the 15 ajp threads are busy waiting, these requests have to 
wait (for a free ajp thread).
Now Tomcat comes back up, but of course that does not help the apache 
ajp threads, who are still waiting on the wrong sockets.
A direct request to Tomcat goes through quickly.
A request through Apache however, has to wait for one of the stuck ajp 
threads to realise that there is a problem, and build a new connection 
to Tomcat.
AJP specialists, what's wrong with the above ?

To Jenny : if you were using mod_jk instead of mod_proxy_ajp, then I 
think something like the cping/cpong feature may help you shorten the 
response time.  But I don't know if mod_proxy_ajp has something similar.

I would also in the meantime check if you have the latest version of 
mod_proxy_ajp.  It is a (relatively) recent module, in which a lot of 
changes have happened over the last few months.  Maybe what you are 
seeing is related to something since corrected.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message