Looking at source, I see that Jeff's patch, and the 'ttl' parameter in general, is only referenced under '#if APR_HAS_THREADS'. When I load-tested and found the timeouts, I was testing under Apache 2.2 Prefork, and thus that patched code is not even compiled, IIUC.
+dev (sorry for the duplicate; my first attempt failed due to not being a subscriber).Keeping modules-dev on CC if that's appropriate.Thanks, Jeff, I was wondering if there was a units issue there. I'm still wondering if anyone can describe the meaning of that argument in more detail. Is that related to my multiget APR_TIMEUP returns? The phrase "time to live of client connection" confuses me. Would it be inaccurate to instead say "the maximum number of seconds apr_memcache is willing to wait for a single operation? Or does it mean *both*, implying that a fresh TCP/IP connection is made for every new operation, but will stay alive for only a certain number of seconds.I have a practical question about how I release software given this change. Our module (mod_pagespeed) is documented to run with Apache 2.2 and Apache 2.4. It seems like for 2.2 I should probably multiple my desired argument by a million. Same with for 2.4.x and earlier, for some value of x. How should I work this in my code? Should I query the version number using an apr utility or something and multiply by a million in certain cases?What's the best practice calling this function for module developers?-JoshOn Wed, Sep 26, 2012 at 6:20 PM, Jeff Trawick <firstname.lastname@example.org> wrote:email@example.com is a better place to ask about details of apr functions.On Wed, Sep 26, 2012 at 5:38 PM, Joshua Marantz <firstname.lastname@example.org> wrote:
> I've been having some success with the apr_memcache_* functions. In
> load-tests, however, I'm finding a lot of timeouts
> with apr_memcache_multgetp. Specifically, the status returned with the
> individual elements is APR_TIMEUP.
> This leads me to wonder what the significance of the second to last arg to
> this function is:
> pool_, hosts_[i].c_str(), ports_[i],
> kDefaultServerMin, kDefaultServerSmax,
> thread_limit_, kDefaultServerTtlUs, &server);
> I have kDefaultServerSmax initialized to 600, as that's the value I found
> in mod_socache_memcache.c But that seems stingy (if it's really in
> microseconds). Should I be giving that a few hundred millis instead?
> that means "time to live of client connection" but I don't understand what
> that phrase means exactly, or if it relates to the APR_TIMEUP returns I've
> been suffering from.
> My code is here;
Coincidentally, earlier today I committed someone's fix for the
confusion about the units of ttl:
It is supposed to be in seconds. Pick up the tiny change to
apr_memcache.c and see if that helps anything. You should continue
this discussion on email@example.com.
Born in Roswell... married an alien...