On 05/29/2007 08:42 PM, Andy Wang wrote:
> We noticed that with mod_proxy_ajp, it's not possible
to set an
> indefinite timeout like was possible with mod_jk. So a
long running JSP
> page, for example:
> <% Thread.sleep(960000); %>
>
> With mod_proxy_ajp timeout set to 300 will cause a 503
to be thrown back
> to the client since mod_proxy_ajp's timeout gets
triggered.
>
> Two questions
> 1) Is there a way to force an indefinite timeout for
mod_proxy_ajp like
> mod_jk has? With mod_jk, if the worker's timeout was
set to 0 it will
> wait indefinitely
Currently not, but there is no upper limit for the timeout.
So I guess setting it to 86400 (1 day) should solve your
problem for the moment.
> 2) how is it that the client doesn't time out? My
firefox client has
> network.http.keep-alive.timeout set to 300. Wireshark
doesn't show any
> keepalive traffic sent back and forth between apache
and the client in
> between the request and the 503 response. I'm
probably reading this
> wrong, but according to the KeepAliveTimeout
documentation:
>
> "The number of seconds Apache will wait for a
subsequent request before
> closing the connection. Once a request has been
received, the timeout
> value specified by the |Timeout
> <http://httpd.apache.org/docs/2.2/mod/core.html#timeout
>| directive
> applies."
First of all do not confuse Timeout and KeepAliveTimeout.
They are completely
different things.
>
> In my request to the Thread.sleep JSP page, the request
was already
> made. Shouldn't the standard Timeout (300s in my case)
apply and
> disconnect the client?
The standard timeout applies, but in your case httpd is not
waiting for an
"event" that times out with this timeout. Timeout
is the number
of seconds httpd tries to send data *to* the client until it
gives up and
assumes the client / network to the client has died. But in
your case httpd
is waiting for a response *from* your servlet engine. So in
this case the
timeout you set for the ajp worker applies which I guess is
set very high
in your case given your first question.
Regards
Rüdiger
|