You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "King Holger (CI/AFP2)" <Ho...@de.bosch.com> on 2010/11/29 18:40:11 UTC

[users@httpd] "mod_proxy_ajp" | timeout | connection losts

Hi Apache2 professionals,

we identified the following problem when using "mod_proxy_ajp" in combination with a balancer configuration (see detailed configuration below), that:
- multiple HTTP requests seem to use the SAME AJP "CHANNEL"
- when just ONE request is exceeding the configured "ProxySet timeout" configuration (see detailed config below), the following error is displayed within the central Apache2 error log (exact the time interval after the long running request):
  [Mon Nov 29 17:17:11 2010] [error] (70007)The timeout specified has expired: ajp_ilink_receive() can't receive header
- when this log entry occurs, all connections running over the above AJP channel are cut - including connections that do run much more shorter than the timeout interval specified. Possibly, Apache2 assumes the Apache Tomcat instance is not reachable anymore and switches from one to the other Tomcat server.
- all clients running over this AJP-connection are lost and loose the connection to the server

Here the long running request (duration is specified in microseconds):
10.35.32.123 - - [29/Nov/2010:17:12:11 +0100] "POST /xxx/Dispatcher HTTP/1.1" 500 538 "<request url>" "Mozilla/4.0 (compatible; MSIE 6.0;Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR3.0.4506.2152; .NET CLR 3.5.30729)" "JSESSIONID=80AC6DFF149E802C3AA8735996CE7AA0.rb-wcmstc1; "80AC6DFF149E802C3AA8735996CE7AA0.rb-wcmstc1" "-" 300456752

Here, the following configuration - including the timeout interval:
      <Proxy balancer://fs4server>
                BalancerMember ajp://rb-wcmstc1.xx.xxxxx.xxx:8009 loadfactor=100 retry=10 route=rb-wcmstc1
                BalancerMember ajp://rb-wcmstc2.xx.xxxxx.xxx:8009 loadfactor=100 retry=10 route=rb-wcmstc2

                ProxySet stickysession=JSESSIONID|jsessionid
                ProxySet lbmethod=byrequests
                ProxySet scolonpathdelim=On
                #ProxySet nofailover=On
                ProxySet timeout=90
        </Proxy>

When checking the documentation for "mod_proxy", below http://httpd.apache.org/docs/current/mod/mod_proxy.html#proxypass we identifed, there are TWO timeout settings available:
- timeout
- connectiontimeout

Our questions:
- how to prevent bundling HTTP-requests in JUST ONE AJP connection?
- how to set "timeout" and "connectiontimeout" intervals to prevent connection losts?
- are there any other possibilites to prevent that behavior?

Any suggestions are very welcome!

Best regards,
Holger King

Robert Bosch GmbH
inside.WCMS  (CI/AFP2)
Postfach 30 02 20
70442 Stuttgart
GERMANY
www.bosch.com<http://www.bosch.com>

Tel. 0711/811-59112
Holger.King@de.bosch.com<ma...@de.bosch.com>

Sitz: Stuttgart, Registergericht: Amtsgericht Stuttgart, HRB 14000;
Aufsichtsratsvorsitzender: Hermann Scholl; Geschäftsführung: Franz Fehrenbach, Siegfried Dais;
Bernd Bohr, Rudolf Colm, Volkmar Denner, Wolfgang Malchow, Peter Marks,
Peter Tyroller; Stefan Asenkerschbaumer, Uwe Raschke, Wolf-Henning Scheider