I'm using python-memcached 1.45 with python 2.5.2, django 1.0.4, spawning 0.9.2, eventlet 0.9.3 and libevent 1.3 on 64bit debian lenny.
spawning server is started with parameters given below:
/usr/bin/python /usr/bin/spawn --factory=spawning.django_factory.config_factory myproject.settings \
--port=8006 --processes=1 --threads=0 --stdout=/dev/null \
--stderr=/var/log/errlog --daemonize --release --host=127.0.0.1
some django views contains memcache.get and memcache.set_multi methods.
Some hours after starting the server, recv-q on memcached gets bloated. and spawning server begins to return 500 for the urls tied to methods that contain memcached interaction codes.
$ sudo netstat -napt|grep 11211
tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN 22350/memcached
tcp 2101 112896 127.0.0.1:11211 127.0.0.1:58498 ESTABLISHED 22350/memcached
tcp 537662 0 127.0.0.1:58498 127.0.0.1:11211 ESTABLISHED 17704/python
tcp 0 0 127.0.0.1:59766 127.0.0.1:11211 TIME_WAIT -
restarting the spawning server, everything gets back to normal, then a few hours later this problem ressurects.
i have the same setup with lighttpd+fastcgi and this problem does not occur. what might be the problem here?