roc230 / spymemcached

Automatically exported from code.google.com/p/spymemcached
0 stars 0 forks source link

in case of "object too large for cache" error; spymemcache goes for closing and reopening memcache connection. #297

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using? On what operating system?
2.6 , 2.10.4 (centos,fedora)

Tell me more...
spy memcache throws error "object too large for cache" in case of object size 
is large. besides, it closing and reconnects the memcache connection. which i 
guess should not be like that. 

In case of high loads, this closing and reopening connection throws Timeout 
exceptions of other async get calls.

logs :
================================================================
==note:removed original key value and used <<<<key>>> notation==
================================================================
2014-02-21 04:37:26.071 ERROR 
net.spy.memcached.protocol.ascii.StoreOperationImpl:  Error:  SERVER_ERROR 
object too large for cache
2014-02-21 04:37:26.072 INFO net.spy.memcached.MemcachedConnection:  
Reconnection due to exception handling a memcached operation on {QA 
sa=localhost/127.0.0.1:11211, #Rops=1, #Wops=1, #iq=0, topRop=Cmd: set Key: 
<<<<<<key>>>>>> Flags: 3 Exp: 1800 Data Length: 1066962, topWop=Cmd: set Key: 
<<<<<<key>>>>>> Flags: 3 Exp: 1800 Data Length: 1066962, toWrite=16384, 
interested=5}. This may be due to an authentication failure.
OperationException: SERVER: SERVER_ERROR object too large for cache
        at net.spy.memcached.protocol.BaseOperationImpl.handleError(BaseOperationImpl.java:166)
        at net.spy.memcached.protocol.ascii.OperationImpl.readFromBuffer(OperationImpl.java:151)
        at net.spy.memcached.MemcachedConnection.readBufferAndLogMetrics(MemcachedConnection.java:813)
        at net.spy.memcached.MemcachedConnection.handleReads(MemcachedConnection.java:792)
        at net.spy.memcached.MemcachedConnection.handleReadsAndWrites(MemcachedConnection.java:672)
        at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:635)
        at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:409)
        at net.spy.memcached.MemcachedConnection.run(MemcachedConnection.java:1334)
2014-02-21 04:37:26.072 WARN net.spy.memcached.MemcachedConnection:  Closing, 
and reopening {QA sa=localhost/127.0.0.1:11211, #Rops=1, #Wops=1, #iq=0, 
topRop=Cmd: set Key: <<<<<<key>>>>>> Flags: 3 Exp: 1800 Data Length: 1066962, 
topWop=Cmd: set Key: <<<<<<key>>>>>> Flags: 3 Exp: 1800 Data Length: 1066962, 
toWrite=16384, interested=5}, attempt 0.
2014-02-21 04:37:26.072 INFO 
net.spy.memcached.protocol.ascii.AsciiMemcachedNodeImpl:  No buffer for current 
write op, removing
2014-02-21 04:37:26.072 WARN 
net.spy.memcached.protocol.ascii.AsciiMemcachedNodeImpl:  Discarding partially 
completed op: Cmd: set Key: <<<<<<key>>>>>> Flags: 3 Exp: 1800 Data Length: 
1066962
================================================================
================================================================

Original issue reported on code.google.com by anurag.i...@gmail.com on 21 Feb 2014 at 12:48

GoogleCodeExporter commented 9 years ago
Hi there,

is there a fix for that?

I get a similar error:

2015-04-04 15:47:10.693 WARN net.spy.memcached.MemcachedConnection:  Closing, 
and reopening {QA sa=localhost/127.0.0.1:11211, #Rops=2, #Wops=0, #iq=0, 
topRop=Cmd: set Key: 1cr8mukwlfisw9rdc9rtdgaqu|||2|||Wicket-Memcached-Guava 
Flags: 2050 Exp: 1800 Data Length: 1197785, topWop=null, toWrite=0, 
interested=1}, attempt 0.
2015-04-04 15:47:10.693 WARN 
net.spy.memcached.protocol.ascii.AsciiMemcachedNodeImpl:  Discarding partially 
completed op: Cmd: set Key: 
1cr8mukwlfisw9rdc9rtdgaqu|||2|||Wicket-Memcached-Guava Flags: 2050 Exp: 1800 
Data Length: 1197785
2015-04-04 15:47:10.693 WARN 
net.spy.memcached.protocol.ascii.AsciiMemcachedNodeImpl:  Discarding partially 
completed op: Cmd: set Key: 
1cr8mukwlfisw9rdc9rtdgaqu|||2|||Wicket-Memcached-Guava Flags: 2050 Exp: 1800 
Data Length: 1197785
2015-04-04 15:47:10,693 WARN  GuavaMemcachedDataStore$1.connectionLost - Lost 
connection to: localhost/127.0.0.1:11211
2015-04-04 15:47:11.318 WARN net.spy.memcached.MemcachedConnection:  Could not 
redistribute to another node, retrying primary node for 
1cr8mukwlfisw9rdc9rtdgaqu|||2|||Wicket-Memcached-Guava.
2015-04-04 15:47:12.553 WARN net.spy.memcached.MemcachedConnection:  Could not 
redistribute to another node, retrying primary node for 
1cr8mukwlfisw9rdc9rtdgaqu|||2|||Wicket-Memcached-Guava.
2015-04-04 15:47:12.694 INFO net.spy.memcached.MemcachedConnection:  
Reconnecting {QA sa=localhost/127.0.0.1:11211, #Rops=0, #Wops=2, #iq=0, 
topRop=null, topWop=Cmd: set Key: 
1cr8mukwlfisw9rdc9rtdgaqu|||2|||Wicket-Memcached-Guava Flags: 2050 Exp: 1800 
Data Length: 1197785, toWrite=0, interested=0}
2015-04-04 15:47:12.695 INFO net.spy.memcached.MemcachedConnection:  Connection 
state changed for sun.nio.ch.SelectionKeyImpl@397be73d
2015-04-04 15:47:12,695 INFO  GuavaMemcachedDataStore$1.connectionEstablished - 
Established connection to: localhost/127.0.0.1:11211, reconnect count: 1
2015-04-04 15:47:12.701 ERROR 
net.spy.memcached.protocol.ascii.StoreOperationImpl:  Error:  SERVER_ERROR 
object too large for cache
2015-04-04 15:47:12.701 INFO net.spy.memcached.MemcachedConnection:  
Reconnection due to exception handling a memcached operation on {QA 
sa=localhost/127.0.0.1:11211, #Rops=2, #Wops=0, #iq=0, topRop=Cmd: set Key: 
1cr8mukwlfisw9rdc9rtdgaqu|||2|||Wicket-Memcached-Guava Flags: 2050 Exp: 1800 
Data Length: 1197785, topWop=null, toWrite=0, interested=1}. This may be due to 
an authentication failure.
OperationException: SERVER: SERVER_ERROR object too large for cache
    at net.spy.memcached.protocol.BaseOperationImpl.handleError(BaseOperationImpl.java:166)
    at net.spy.memcached.protocol.ascii.OperationImpl.readFromBuffer(OperationImpl.java:151)
    at net.spy.memcached.MemcachedConnection.readBufferAndLogMetrics(MemcachedConnection.java:813)
    at net.spy.memcached.MemcachedConnection.handleReads(MemcachedConnection.java:792)
    at net.spy.memcached.MemcachedConnection.handleReadsAndWrites(MemcachedConnection.java:672)
    at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:635)
    at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:409)
    at net.spy.memcached.MemcachedConnection.run(MemcachedConnection.java:1334)

Original comment by error.fl...@gmail.com on 4 Apr 2015 at 3:13