Discussion:
Request timeout option in HTTP or AJP Connector
Harsimranjit singh Kler
2012-06-22 09:11:08 UTC
Permalink
Hi

Using tomcat 6.0.29.

i want to know is there any parameter in HTTP\AJP connector to set
request time out(i.e if particular request taking long time to complete it
should time out after configured timeout value).?

My web application communicating to some external system where response is
very slow for particular queries so i want tomcat to timout those requests.

I checked and tested with setting *connectionTimeout,keepAliveTimeout *values
but these paremeter have different meaning and role in connector as per my
understanding from tomcat documentation.

regards
Harsimran
chris derham
2012-06-22 10:11:57 UTC
Permalink
Post by Harsimranjit singh Kler
Using tomcat 6.0.29.
i want to know is there any parameter in HTTP\AJP connector to set
request time out(i.e if particular request taking long time to complete it
should time out after configured timeout value).?
My web application communicating to some external system where response is
very slow for particular queries so i want tomcat to timout those requests.
How do you communicate with the external system? You say "particular
queries" so is it jdbc? Can't you set a timeout whatever communication
mechanism you use to connect to the external system? Then detect the
timeout in your webapp and respond appropriately

Chris
Harsimranjit singh Kler
2012-06-22 10:35:49 UTC
Permalink
External system can be jdbc ,soap ,rest or other different type of protocol
.So i dont have that freedom always.

Yes i agree i can do query timeout in Database case,but not in all External
system so i was thinking timeout from connector side.
Post by Harsimranjit singh Kler
Post by Harsimranjit singh Kler
Using tomcat 6.0.29.
i want to know is there any parameter in HTTP\AJP connector to set
request time out(i.e if particular request taking long time to complete
it
Post by Harsimranjit singh Kler
should time out after configured timeout value).?
My web application communicating to some external system where response
is
Post by Harsimranjit singh Kler
very slow for particular queries so i want tomcat to timout those
requests.
Post by Harsimranjit singh Kler
How do you communicate with the external system? You say "particular
queries" so is it jdbc? Can't you set a timeout whatever communication
mechanism you use to connect to the external system? Then detect the
timeout in your webapp and respond appropriately
Chris
André Warnier
2012-06-22 16:12:17 UTC
Permalink
Post by Harsimranjit singh Kler
External system can be jdbc ,soap ,rest or other different type of protocol
.So i dont have that freedom always.
Yes i agree i can do query timeout in Database case,but not in all External
system so i was thinking timeout from connector side.
Please, respond to comments/questions *below* the original, not on top of the email.
It makes it a lot easier to follow the logical flow of questions/responses.

About your original request : the Tomcat <Connectors> mentioned in Tomcat's server.xml
/have nothing to do/ with how your application talks to anything else.
The Connectors handle only the HTTP/HTTPS/AJP requests/responses that go between the
browser and Tomcat.
If your application talks to anything else, then the timeouts have to be set there (in
whatever your application is using to do that).
Any timeouts (or any other parameter) set at the Tomcat Connector level will not have any
effect here.
Harsimranjit singh Kler
2012-06-22 18:38:06 UTC
Permalink
Post by André Warnier
Please, respond to comments/questions *below* the original, not on top of the email.
It makes it a lot easier to follow the logical flow of questions/responses.
About your original request : the Tomcat <Connectors> mentioned in
Tomcat's server.xml /have nothing to do/ with how your application talks to
anything else.
The Connectors handle only the HTTP/HTTPS/AJP requests/responses that go
between the browser and Tomcat.
If your application talks to anything else, then the timeouts have to be
set there (in whatever your application is using to do that).
Any timeouts (or any other parameter) set at the Tomcat Connector level
will not have any effect here.


Thanks,Intially i was in doubt that we can set request timeout at tomcat
connector level as well.

Loading...