[ZODB-Dev] RelStorage: Memcache clients throws errors on commit now and then
Shane Hathaway
shane at hathawaymix.org
Tue Sep 14 21:22:58 EDT 2010
On 09/14/2010 04:25 AM, Anton Stonor wrote:
> Module relstorage.cache, line 258, in send_queue
> Module memcache, line 643, in set_multi
> TypeError: 'int' object is unsubscriptable
>
>
> I happens what appears to be randomly on content creation, file upload,
> indexing, but not in a consistent way. Does this ring a bell -- Shane?
This is a bug in python-memcached. Under some circumstances,
_val_to_store_info() returns 0 (see line 713), yet set_multi(), line
643, is not prepared to handle that return value. You would be doing a
good service if you reported this to the authors.
I always use pylibmc. It's slightly harder to set up, but in my
experience, it's fast and reliable. If you use it, be sure to use the
wrapper from the relstorage package. The wrapper ignores memcached
connection problems. See the zodbshootout buildout.cfg for a way to
install libmemcached and pylibmc using only Buildout.
http://svn.zope.org/zodbshootout/trunk/buildout.cfg?rev=113708
See the [libmemcached] and [pylibmc] sections in particular.
Shane
More information about the ZODB-Dev
mailing list