We have the following setting in mod_proxy: BalancerMember http://server1:48080 route=sp_server1 connectiontimeout=3 timeout=120 BalancerMember http://server2:48080 route=sp_server2 connectiontimeout=3 timeout=120 We tried it, but the tcp connection timeout does not works, in case of network failure it waits much longer (few minutes) instead of 3 secs. We checked the mod_prixy code, and found that it should be corrected.
If you already had a look at the code: Do you care to tell us were the changes would need to be done?
We had the following config: <Proxy balancer://sp_cluster> BalancerMember http://t1:48080 route=sp_server1 timeout=120 BalancerMember http://t2:48080 route=sp_server2 timeout=120 ProxySet stickysession=JSESSIONID </Proxy> But we got: Syntax error on line 12 of /home/webapp/apache/conf/vh.spportal.sp_cluster.conf: BalancerMember Connectiontimeout has wrong format The configuration is not proper, so the server spportal_server cannot start! We found that the bug somewhere here: if (ap_timeout_parameter_parse(val, &timeout, "s") != APR_SUCCESS) return "Connectiontimeout has wrong format"; But it is very complicated.. But from another forum a similar problem with release 2.2.11: Site index · List index Message view « Date » · « Thread » Top « Date » · « Thread » From "Ian Lea" <ian....@gmail.com> Subject [users@httpd] 2.2.11: BalancerMember Ping/Pong timeout has wrong format Date Wed, 31 Dec 2008 12:20:01 GMT Hi On apache 2.2.10 a config file with these lines <Proxy balancer://xxx> BalancerMember ajp://localhost:17100 route=yyy ping=10 </Proxy> works fine, but on 2.2.11 it fails to parse, showing error Syntax error on line 73 of /opt/apache-2.2.11/conf/test.conf: BalancerMember Ping/Pong timeout has wrong format I see that the changes file includes mod_proxy: Add the possibility to set the worker parameters connectiontimeout and ping in milliseconds. [Ruediger Pluem] If I've followed the code path correctly (far from certain), server/util.c says that the following units are understood * ms : milliseconds * s : seconds * mi[n] : minutes * h : hours but adding any of those makes no difference - they all still fail with the parse error. Any suggestions? Ian. ian.lea@gmail.com And also refer to this: https://issues.apache.org/bugzilla/show_bug.cgi?id=46500
And found a possible solution on a forum: .... Found the same issue here. Have debugged the problem with gdb. In function util.c:ap_timeout_parameter_parse the first errno checking is true, so it returns an error to its caller. The apr_strings.c:apr_strtoi64 function just above should clear the errno variable at the beginning, I think. The following patch against apr_strings.c works for me. diff -uNr /httpd-2.2.11/srclib/apr/strings/apr_strings.c.orig \ /httpd-2.2.11/srclib/apr/strings/apr_strings.c --- /httpd-2.2.11/srclib/apr/strings/apr_strings.c.orig 2006-08-03 +12:55:31.000000000 +0200 +++ /httpd-2.2.11/srclib/apr/strings/apr_strings.c 2009-01-14 +23:24:55.000000000 +0100 @@ -244,6 +244,7 @@ APR_DECLARE(apr_int64_t) apr_strtoi64(const char *nptr, char **endptr, int base) { + errno = 0; #ifdef APR_INT64_STRFN return APR_INT64_STRFN(nptr, endptr, base); #else Regards, Javi.
(In reply to comment #2) > > On apache 2.2.10 a config file with these lines > > <Proxy balancer://xxx> > BalancerMember ajp://localhost:17100 route=yyy ping=10 > </Proxy> > > works fine, but on 2.2.11 it fails to parse, showing error > This was a bug in apr. The version now bundled with 2.2.12 does not contain this problem. So please retest with 2.2.12.
(In reply to comment #4) > (In reply to comment #2) > > > > > On apache 2.2.10 a config file with these lines > > > > <Proxy balancer://xxx> > > BalancerMember ajp://localhost:17100 route=yyy ping=10 > > </Proxy> > > > > works fine, but on 2.2.11 it fails to parse, showing error > > > > This was a bug in apr. The version now bundled with 2.2.12 does not contain > this problem. So please retest with 2.2.12. Just test the same configuration with version 2.2.12. The apr_strings.c seems to have been patched, but i still get the same error : BalancerMember Ping/Pong timeout has wrong format Regards, --Fabrice Gaillard
(In reply to comment #5) > > This was a bug in apr. The version now bundled with 2.2.12 does not contain > > this problem. So please retest with 2.2.12. > > Just test the same configuration with version 2.2.12. > The apr_strings.c seems to have been patched, but i still get the same error : > > BalancerMember Ping/Pong timeout has wrong format > I cannot reproduce this issue with 2.2.12. Either you use an older apr version that is installed somewhere else on your system or you have any kind of crappy characters in your config (maybe invisible to your editor).
*** Bug 48893 has been marked as a duplicate of this bug. ***