apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "peter baer" <peterb...@gmail.com>
Subject apr_memcache 1.3.X sending unnecessary QUIT to memcached server
Date Thu, 11 Sep 2008 01:38:37 GMT
Dear apr_memcache developers,

I am currently using the apr-util 1.3.X (rev 692755) of apr_memcache
and have noticed that for every active reslist (hard minimum) a
"quit." message is sent to the memcached server before the intended
query. Is there a way to avoid this? This never used to happen on
earlier versions.

An example below:
1. set the apr_memcache_create hard min to 32
2. call apr_memcache_getp on a any "key"
3. watch ngrep spam 32 "quit."'s before the intended query:

ie:
---------------------
######
T 2008/09/09 22:39:45.984160 127.0.0.1:57116 -> 127.0.0.1:15879 [AP]
quit.

#####
T 2008/09/09 22:39:45.984218 127.0.0.1:57115 -> 127.0.0.1:15879 [AP]
quit.

######
T 2008/09/09 22:39:45.984271 127.0.0.1:57114 -> 127.0.0.1:15879 [AP]

quit.
######
T 2008/09/09 22:39:45.984318 127.0.0.1:57113 -> 127.0.0.1:15879 [AP]
quit.
...
etc
...
########
T 2008/09/09 22:39:45.984428 127.0.0.1:57145 -> 127.0.0.1:15879 [AP]
get mykey.

##
T 2008/09/09 22:39:45.984457 127.0.0.1:15879 -> 127.0.0.1:57145 [AP]
VALUE mykey 0 7.
myvalue.
END.
---------------------

I have attached a test program (main.c) showing how I triggered this
issue. It has a hard min of 32, and sends a "set" and
a "get", once every 5 seconds.  This triggers 32 quits every 5 seconds.

Can anyone see what I'm doing wrong here?
I'm trying to maintain a connection pool of 32 connections to our
memcached server to reduce the number of TCP sessions establishments
under high load conditions

Thanks,
Peter Baer

Mime
View raw message