uohzoaix / spymemcached

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

getStats() starts to fail after a few hours of use #34

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We are using memcached client 1.2 on 64 bit Centos. Connecting to memcached
1.2.6

After upgrading to 1.2 the getStatus() method has started failing after few
hours of use with the following exception:

2008-09-04 06:38:24.750 INFO net.spy.memcached.MemcachedConnection: 
Reconnecting due to exception on {QA sa=/10.0.8.2:11211, #Rops=1, #Wops=0,
#iq=0,
topRop=net.spy.memcached.protocol.ascii.MutatorOperationImpl@77353e5d,
topWop=null, toWrite=0, interested=1}
java.lang.NumberFormatException: For input string: "18446744073709542381"
        at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Long.parseLong(Long.java:415)
        at java.lang.Long.<init>(Long.java:671)
        at
net.spy.memcached.MemcachedClient$9.receivedStatus(MemcachedClient.java:1043)
        at
net.spy.memcached.protocol.ascii.MutatorOperationImpl.handleLine(MutatorOperatio
nImpl.java:46)
        at
net.spy.memcached.protocol.ascii.OperationImpl.readFromBuffer(OperationImpl.java
:132)
        at
net.spy.memcached.MemcachedConnection.handleReads(MemcachedConnection.java:300)
        at
net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:262)
        at
net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:182)
        at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1259)

telnetin to the memcached server(s) and getting the stats manually returns
sensible data, not the huge number which cases the exception in parsing it
into a Long.

Original issue reported on code.google.com by jpvirola...@gmail.com on 4 Sep 2008 at 2:48

GoogleCodeExporter commented 9 years ago
I'm assuming this is getStats()

Original comment by dsalli...@gmail.com on 2 Oct 2008 at 7:06

GoogleCodeExporter commented 9 years ago
Can you provide some example code where this occurs, and tell me with what 
client
version (java -jar memcached.jar will tell you the version).

Original comment by dsalli...@gmail.com on 19 Dec 2008 at 4:53

GoogleCodeExporter commented 9 years ago
This stack trace shows a mutation (incr?) overflowing a 64-bit number.  I don't 
think
stats are related.  Looks like you're using up all 64-bits of an increment.  
Not sure
why you're doing that, but once you run out of incr space, you'll have other
problems, anyway.

Original comment by dsalli...@gmail.com on 26 Jan 2009 at 7:06

GoogleCodeExporter commented 9 years ago
Im getting this exception as well.
INFO net.spy.memcached.MemcachedConnection:  Reconnecting due to exception on 
{QA
sa=myserver/myserverip:11211, #Rops=2, #Wops=0, #iq=0,
topRop=net.spy.memcached.protocol.ascii.MutatorOperationImpl@788c268, 
topWop=null,
toWrite=0, interested=1}
java.lang.NumberFormatException: For input string: "18446744073709427549"
 at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Long.parseLong(Long.java:422)
        at java.lang.Long.<init>(Long.java:678)
        at net.spy.memcached.MemcachedClient$9.receivedStatus(MemcachedClient.java:1134)
        at
net.spy.memcached.protocol.ascii.MutatorOperationImpl.handleLine(MutatorOperatio
nImpl.java:48)
        at
net.spy.memcached.protocol.ascii.OperationImpl.readFromBuffer(OperationImpl.java
:132)
        at
net.spy.memcached.MemcachedConnection.handleReads(MemcachedConnection.java:361)
        at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:305)
        at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:192)
        at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1444)

Original comment by fefewa...@gmail.com on 31 Aug 2009 at 5:10

GoogleCodeExporter commented 9 years ago
Can you show me the output of a plain "stats" call when this is happening?  
That is,
just telnet into the server and type "stats" ?

Original comment by dsalli...@gmail.com on 31 Aug 2009 at 8:01

GoogleCodeExporter commented 9 years ago
FWIW - I am seeing this issue for an application that does a set key value to 0 
followed immediately by an incr for the same key value. When I query they key 
directly via telnet it is 18446744073709427549 or something similar. Stats does 
not play into it all. I assume it is some kind of server issue.

Let me know if I can help on this. I can reproduce this and have Wireshark 
traces.

Original comment by yangcoo...@gmail.com on 15 Sep 2010 at 7:44