httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: svn commit: r1696105 - in /httpd/httpd/trunk: CHANGES docs/manual/mod/mod_socache_memcache.xml modules/cache/mod_socache_memcache.c
Date Mon, 24 Aug 2015 09:18:43 GMT
On Mon, Aug 24, 2015 at 8:17 AM, Christophe JAILLET
<christophe.jaillet@wanadoo.fr> wrote:
>
> Le 21/08/2015 15:47, Yann Ylavic a écrit :
>>
>> On Sun, Aug 16, 2015 at 12:05 AM,  <jailletc36@apache.org> wrote:
>>>
>>> +    if ((i < 1) || (i > 1800)) {
>>
>> Why a limit of 1800? Maybe the implicit INT_MAX is good enough.
>> Also the memcached may never close its connections by itself, or
>> always do, so -1 and 0 could also be interesting...
>
> Obviously 0 should be allowed, but I don't see any reason for -1. What
> difference would you make between the 2?

Hm, I thought that for apr_memcache_server_create (hence
apr_reslist_create), ttl=0 was "always close" (immediately) and -1 was
"never close" (infinite), but that's not the case (ttl=0 means "never
close", and -1 is invalid).

I don't know if memcached can be configured to always close the
connections when done (I guess so), but since the minimal TTL is 1
second, we could end up reusing connections closed remotely (without
recovering on error) in this case.

So maybe our best option is to use ap_timeout_parameter_parse() to set
sconf->ttl, which would allow a TTL of 1 microsecond (min), and almost
no max (native 64bit apr_time_t)...

Regards,
Yann.

Mime
View raw message