Thanks All,

So to use the custom Transconder, I am using

public <T> Future<Boolean> set(String key,int exp,T o,Transcoder<T>
tc) of net.spy.memcached.MemcachedClient

and passing 'new SerializingTranscoder(max)' as the Transcoder object,
with the higher limit I need.
instead of
public Future<Boolean> set(String key,int exp,Object o)

This seems to be working. It stored objects with size greater than 1
MB.

However, at some point I am still getting the same error - I can debug
this further
But please respond if you feel that this is not I am supposed to do.

I believe that, this could be because I am storing huge objects
resulting a network latency.

2010-11-10 19:55:11.832 INFO net.spy.memcached.MemcachedConnection:
Reconnecting due to exception on {QA sa=/[host]:11211, #Rops=1,
#Wops=0, #iq=0,
toprop=net.spy.memcached.protocol.binary.getoperationi...@5b475b9e,
topWop=null, toWrite=0, interested=1}
java.lang.IllegalArgumentException: Cannot cache data larger than
1048576 bytes (you tried to cache a 2541225 byte object)
        at net.spy.memcached.CachedData.<init>(CachedData.java:30)
        at net.spy.memcached.MemcachedClient
$4.gotData(MemcachedClient.java:790)
        at
net.spy.memcached.protocol.binary.GetOperationImpl.decodePayload(GetOperationImpl.java:
45)
        at
net.spy.memcached.protocol.binary.OperationImpl.finishedPayload(OperationImpl.java:
153)
        at
net.spy.memcached.protocol.binary.OperationImpl.readFromBuffer(OperationImpl.java:
133)
        at
net.spy.memcached.MemcachedConnection.handleReads(MemcachedConnection.java:
401)
        at
net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:
333)
        at
net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:
219)
        at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:
1591)

Thanks
Abhilash

Reply via email to