roc230 / spymemcached

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

java.lang.IllegalStateException: Timed out waiting #258

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What version of the product are you using? On what operating system?
Memcached-2.5.jar. SunOS and windows 

Tell me more...

Most often I get the below error while deleting the data from Memcached. So, I 
use MemcachedClient.flush command and it works fine. 

org.civ.architecture.batch.ModuleLaunchException: Exception in 
Memcached.deleteData()
+ java.lang.IllegalStateException: Timed out waiting to add 
net.spy.memcached.protocol.ascii.DeleteOperationImpl@14e45b3(max wait=10000ms)

below is the method which will be called to delete the data.

public void deleteData( String key ) throws MemcachedException
{
  if( mem != null )
  {
    try
    {
      MemcachedClient.delete( key );
    }
    catch( Exception e )
    {           
      throw new TestException("error in memcached");
    }
  }
}

Original issue reported on code.google.com by padma.al...@gmail.com on 17 Oct 2012 at 12:22

GoogleCodeExporter commented 9 years ago
I get the below warning messages and errors out. I am not sure whether there 
are lot of records in Memcached which causes this error while deleting the 
existing records from Memcached.

2012-10-17 09:59:53.997 WARN 
net.spy.memcached.protocol.ascii.AsciiMemcachedNodeImpl:  Discarding partially 
completed op: net.spy.memcached.protocol.ascii.DeleteOperationImpl@1ce3a26
2012-10-17 09:59:53.997 WARN 
net.spy.memcached.protocol.ascii.AsciiMemcachedNodeImpl:  Discarding partially 
completed op: net.spy.memcached.protocol.ascii.DeleteOperationImpl@4ba620
2012-10-17 09:59:53.997 WARN 
net.spy.memcached.protocol.ascii.AsciiMemcachedNodeImpl:  Discarding partially 
completed op: net.spy.memcached.protocol.ascii.DeleteOperationImpl@87b565
java.lang.IllegalStateException: Timed out waiting to add 
net.spy.memcached.protocol.ascii.DeleteOperationImpl@19a145d(max wait=10000ms)
    at net.spy.memcached.protocol.TCPMemcachedNodeImpl.addOp(TCPMemcachedNodeImpl.java:273)
    at net.spy.memcached.MemcachedConnection.addOperation(MemcachedConnection.java:602)
    at net.spy.memcached.MemcachedConnection.addOperation(MemcachedConnection.java:582)
    at net.spy.memcached.MemcachedClient.addOp(MemcachedClient.java:277)
    at net.spy.memcached.MemcachedClient.delete(MemcachedClient.java:1476)
    ... ignored rest of the error messages
2012-10-17 10:00:04.037 WARN net.spy.memcached.MemcachedClient:  Problem 
handling memcached IO
java.lang.IllegalStateException: Timed out waiting to add 
net.spy.memcached.protocol.ascii.DeleteOperationImpl@b5e5d7(max wait=10000ms)
    at net.spy.memcached.protocol.TCPMemcachedNodeImpl.addOp(TCPMemcachedNodeImpl.java:273)
    at net.spy.memcached.MemcachedConnection.addOperation(MemcachedConnection.java:602)
    at net.spy.memcached.MemcachedConnection.addOperation(MemcachedConnection.java:582)
    at net.spy.memcached.MemcachedConnection.redistributeOperations(MemcachedConnection.java:491)
    at net.spy.memcached.MemcachedConnection.queueReconnect(MemcachedConnection.java:471)
    at net.spy.memcached.MemcachedConnection.lostConnection(MemcachedConnection.java:304)
    at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:367)
    at net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:219)
    at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1591)
2012-10-17 10:00:04.070 INFO net.spy.memcached.MemcachedConnection:  
Reconnecting {QA sa=ddcmem02.trusted.c-iv.net/192.168.27.16:8065, #Rops=0, 
#Wops=19804, #iq=1, topRop=null, 
topWop=net.spy.memcached.protocol.ascii.DeleteOperationImpl@6c1a82, toWrite=0, 
interested=0}
2012-10-17 10:00:04.071 INFO net.spy.memcached.MemcachedConnection:  
Reconnecting {QA sa=ddcmem01.trusted.c-iv.net/192.168.27.19:8065, #Rops=0, 
#Wops=513408, #iq=2, topRop=null, 
topWop=net.spy.memcached.protocol.ascii.DeleteOperationImpl@97df94, toWrite=0, 
interested=0}
2012-10-17 10:00:04.075 INFO net.spy.memcached.MemcachedConnection:  Connection 
state changed for sun.nio.ch.SelectionKeyImpl@bc7c65
2012-10-17 10:00:05.072 WARN net.spy.memcached.MemcachedConnection:  Shut down 
with 7060 bytes remaining to write
Exception in thread "main" 
 + java.lang.IllegalStateException: Timed out waiting to add net.spy.memcached.protocol.ascii.DeleteOperationImpl@19a145d(max wait=10000ms)

Please let me know if you need any other information.

Original comment by padma.al...@gmail.com on 17 Oct 2012 at 5:19

GoogleCodeExporter commented 9 years ago
2.5 is very, very old at this stage.  I don't think we'll be able to go back to 
2.5 to look at this.

Is there anything in the log prior to this-- perhaps something about the 
connection being dropped?

Original comment by ingen...@gmail.com on 17 Oct 2012 at 5:30

GoogleCodeExporter commented 9 years ago
The client connection is dropped after it throws the exception. As per the 
error it tries to reconnects. Connection state is also changed but suddently it 
drops the connection specifying "7060 bytes remaining to write". Is this issue 
similar to issue nbr = 192? Becos, this happens when I try to load huge amount 
of records and deleting 1 record at a time.

I will upgrade to "spymemcached-2.7.3.jar" and test it. 

Original comment by padma.al...@gmail.com on 17 Oct 2012 at 6:02