开发者

accessing memcached stats via cmemcache or django returns warning

My Django application uses memcached via cmemcache. An issue sprung up when I was trying to monitor its usage:

I tried to access stats memcached provides through both Django and cmemcache:

django:

from django.core.cache import cache
cache._cache.get_stats()
[WARN@1257320533.841286] mcm_server_stats():3027: unknown stat variable: pointer_size

cmemcache:

import cmemcache
client=cmemcache.Client(['127.0.0.1:62656',])
client.get_stats()
[WARN@1257321135.126632] mcm_server_stats():3027: unknown stat variable: pointer_size

I can get nothing more than a warning. However, memcached itself provides stats without problems:

telnet 127.0.0.1 62656
stats
...

The web page of cmemcache mentions that "libmemcache-1.4.0.rc2 is not compatible with memcached 1.2.1, this results in get_stats returning no stats". The app is running on Debian. memcached's version is 1.2.2. I have no idea if there is still an incompatibility problem.

Is there anyone who has encounter开发者_运维技巧ed this issue and has a solution?


First, you should not run those versions of memcached. They have lots and lots of known bugs and are many years old.

Secondly, we add stats to memcached quite frequently, so if these libraries are complaining when they encounter new stats, you should complain to their authors.

Also, I don't believe cmemcache is maintained. It's based on a deprecated memcached C library that has several known bugs. Users of that library are encouraged to migrate to libmemcached.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜