Memcache - Values may not be more than 1000000 bytes in length

325 views
Skip to first unread message

jago

unread,
Oct 29, 2009, 1:52:22 PM10/29/09
to Google App Engine
How can I best prevent against the following error? Can I check the
length of items before putting them in the memcache?

File "/base/python_lib/versions/1/google/appengine/api/memcache/
__init__.py", line 635, in _set_with_policy
stored_value, flags = _validate_encode_value(value,
self._do_pickle)
File "/base/python_lib/versions/1/google/appengine/api/memcache/
__init__.py", line 180, in _validate_encode_value
'received %d bytes' % (MAX_VALUE_SIZE, len(stored_value)))
ValueError: Values may not be more than 1000000 bytes in length;
received 1861357 bytes

Andy Freeman

unread,
Oct 29, 2009, 7:11:28 PM10/29/09
to Google App Engine
Reply all
Reply to author
Forward
0 new messages