[#1011214] memcache_stats function increases a list of servers on every pg_ctr reload

View Trackers | Bugs | Download .csv | Monitor

Date:
2012-07-26 10:18
Priority:
3
State:
Open
Submitted by:
Timur Luchkin (thamerlan)
Assigned to:
Hannu Valtonen (ormod)
Category:
pg_functions
Group:
Resolution:
None
Category:
pg_functions
Group:
Resolution:
None
Summary:
memcache_stats function increases a list of servers on every pg_ctr reload

Detailed description
I have one memchached server assigned via
pgmemcache.default_servers = 'xx.xx.191.108:11500'

Right after the PostgreSQL startup I have one "block" (or server) in the result of "memcache_stats()" call:

memcache_stats
-------------------------------
+
Server: xx.xx.191.108 (11500)+
pid: 6266 +
uptime: 1715805 +
time: 1343297104 +
version: 1.4.13 +
pointer_size: 64 +
rusage_user: 0.330949 +
rusage_system: 0.656900 +
curr_items: 10031 +
total_items: 10159 +
bytes: 4878689 +
curr_connections: 5 +
total_connections: 273 +
connection_structures: 21 +
cmd_get: 22672 +
cmd_set: 10159 +
get_hits: 12214 +
get_misses: 10458 +
evictions: 0 +
bytes_read: 5510663 +
bytes_written: 5328863 +
limit_maxbytes: 134217728 +
threads: 4 +


If I will do "pg_ctl reload" (with NO changes to pgmemcache settings), when "memcache_stats()" will return 2 blocks with the same server IP:
SELECT memcache_stats();
memcache_stats
-------------------------------
+
Server: xx.xx.191.108 (11500)+
pid: 6266 +
uptime: 1715805 +
time: 1343297104 +
version: 1.4.13 +
pointer_size: 64 +
rusage_user: 0.330949 +
rusage_system: 0.656900 +
curr_items: 10031 +
total_items: 10159 +
bytes: 4878689 +
curr_connections: 5 +
total_connections: 273 +
connection_structures: 21 +
cmd_get: 22672 +
cmd_set: 10159 +
get_hits: 12214 +
get_misses: 10458 +
evictions: 0 +
bytes_read: 5510663 +
bytes_written: 5328863 +
limit_maxbytes: 134217728 +
threads: 4 +
Server: xx.xx.191.108 (11500)+
pid: 6266 +
uptime: 1715805 +
time: 1343297104 +
version: 1.4.13 +
pointer_size: 64 +
rusage_user: 0.330949 +
rusage_system: 0.656900 +
curr_items: 10031 +
total_items: 10159 +
bytes: 4878689 +
curr_connections: 5 +
total_connections: 274 +
connection_structures: 21 +
cmd_get: 22672 +
cmd_set: 10159 +
get_hits: 12214 +
get_misses: 10458 +
evictions: 0 +
bytes_read: 5510677 +
bytes_written: 5329936 +
limit_maxbytes: 134217728 +
threads: 4 +

Any next "pg_ctl reload" will add one more "block" to the output of this function.
I tried to add second Memcached server, right after the "reload", - function returns 4 blocks (servers).


System and versions:
CentOS release 5.6 (Final) 2.6.18-238.9.1.el5 64bit
postgresql-9.0.4
libevent-2.0.11-stable
memcached-1.4.13
pgmemcache_2.0.6.tar.bz2
postgresql.conf:
shared_preload_libraries = 'pgmemcache,pg_stat_statements'
custom_variable_classes = 'pgmemcache,usrvar,pg_stat_statements'
pgmemcache.default_servers = 'xx.xx.191.108:11500'
pgmemcache.default_behavior = 'BINARY_PROTOCOL:1'

Followup

Message
Date: 2012-09-06 07:52
Sender: Timur Luchkin

Wrong with
libevent-2.0.11-stable
should be
libmemcached-1.0.4

Attached Files:

Changes:

Field Old Value Date By
assigned_tonone2012-09-06 07:50thamerlan
Powered By FusionForge