Memcache set_multi () error in Google AppEngine with ndb

We tried out some legacy datastore data in our Google AppEngine Python app. I checked the log and saw the following warning in queries that should have updated the relevant data:

Memcache set_multi() error: [':part', ':full']

      

The log was written after ndb.put (). There were no exceptions, only this quiet magazine. However, the model was not written to the data warehouse. This was repeated several times four times.

To be precise, I'm not 100% sure if the log was generated during the put () of my model, or afterwards, while GAE stores the appstats for that particular request. Also, this log says our memcache is full, I obviously don't see it as a problem (caches are expected to fill up from time to time, right?).

However, in all of the cases where this log was created, put () did not write any data to the datastore, and I cannot determine why this happened. If ndb.put () failed, I would expect some sort of or error / exception raised (my code handles them), but the warning was quiet.

Any suggestions?

+3


source to share


1 answer


You can disable memcache in the NDB Context class . This SO answer shows how to enable / disable memcache: ndb Models are not stored in memcache when using MapReduce

This code disables all caching:



ndb_ctx = ndb.get_context()
ndb_ctx.set_cache_policy(lambda key: False)
ndb_ctx.set_memcache_policy(lambda key: False)

      

+1


source







All Articles