https://bz.apache.org/bugzilla/show_bug.cgi?id=58091
Bug ID: 58091
Summary: mod_socache_memcache does not reuse memcache
connections
Product: Apache httpd-2
Version: 2.5-HEAD
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P2
Component: mod_socache_(dbm|dc|memcache|shmcb)
Assignee: [email protected]
Reporter: [email protected]
While trying to use memcache for SSL sessions
SSLSessionCache memcache:127.0.0.1
I noticed the connection to the memcache server is not reused but dropped and
recreated on every request. This can be checked using tcpdump.
The cause of this behavior seems to be incorrect TTL setting in
mod_socache_memcache.c:
#ifndef MC_DEFAULT_SERVER_TTL
#define MC_DEFAULT_SERVER_TTL 600
#endif
This is than used when creating memcache server:
rv = apr_memcache_server_create(p,
host_str, port,
MC_DEFAULT_SERVER_MIN,
MC_DEFAULT_SERVER_SMAX,
thread_limit,
MC_DEFAULT_SERVER_TTL,
&st);
My guess is the author wanted a TTL of 600 seconds (10 minutes) which is
reasonable, but the problem is the units for this parameter are in microseconds
so the connection does not have a chance of reuse in next 600 microseconds.
Changing this constant to 600 * 1000 * 1000 restores the intended behavior of
caching the connection for 10 minutes.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]