Pratik Khadloya
Pratik Khadloya

Reputation: 12869

memcache find offending object (exceeding 1 MB limit)

Memcache is giving an error in the following error in logs

MemCacheError (Value too large, memcached can only store 1MB of data per key)

I have many objects being set in memcache. I am not sure which object it is talking about. The stats command gives a high level detail. Is there a way to telnet into memcache and tell which object's size is exceeding?

Upvotes: 2

Views: 533

Answers (2)

Cagdas Emek
Cagdas Emek

Reputation: 11

You should calculate the size of objects before stored. You can easily track which one is more than 1M. Otherwise it's impossible as @duskwuff mentioned.

Upvotes: 0

user149341
user149341

Reputation:

No, you won't be able to find it — the object was never stored! (The whole point of the error message is that memcached was unable to store the object because it was too large.) You will need to add instrumentation to the client software to find out where it's trying to create the large object.

Upvotes: 3

Related Questions