Open GoogleCodeExporter opened 9 years ago
I would like to which version should use instead of v2.3.1 so I do not run in
to the above exception even though I write millions of items continuously.
Writing millions of items is something we do regularly. So, any help would be
appreciated.
Original comment by lakshmip...@gmail.com
on 4 May 2011 at 7:36
There is a method for waiting for queues to get through some of the work, or I
believe you can pass in your own queue implementation. 2.3.1 is quite old
though, can you update to 2.5?
Original comment by ingen...@gmail.com
on 4 May 2011 at 10:47
Could you confirm that this issue doesn't exist in v2.5 ?
If not, could you please let me know the method that exists to wait for the
queue to to get through some of the work so I can use the sam?
Original comment by lakshmip...@gmail.com
on 5 May 2011 at 2:22
I used v2.5, but landed on a new exception instead of queue full (below).
I tried using waitforqueue(), but this doesn't ensure not to hit queue full
error ever. So, looking for ever a solution for it.
java.lang.IllegalStateException: Timed out waiting to add
net.spy.memcached.protocol.ascii.StoreOperationImpl@6143408f(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.asyncStore(MemcachedClient.java:314)
at net.spy.memcached.MemcachedClient.set(MemcachedClient.java:691)
Original comment by lakshmip...@gmail.com
on 5 May 2011 at 9:53
WaitforQueues():
I tried using waitforQueues() with various timings but once or twice ran in to
the same exception though was successful occasionally.
I would like to ensure I never run in to this issue.
v2.5 jar:
I have set the following in JVM start options. Still I get
java.lang.IllegalStateException: Timed out waiting to add
net.spy.memcached.protocol.ascii.StoreOperationImpl@6143408f(max wait=10000ms).
Where max wait shows 10seconds where as I have set 20 seconds for timeout in my
JVM start options. Please suggest if any setting need to be added/modified.
-Dnet.spy.memcached.DefaultConnectionFactory.defaultOperationTimeout=20000
-Dnet.spy.memcached.DefaultConnectionFactory.defaultOpQueueLen=100
-Dnet.spy.memcached.DefaultConnectionFactory.defaultReadBufferSize=1048576
Original comment by lakshmip...@gmail.com
on 6 May 2011 at 10:29
The reason for this issue is the asynchronous characteristic of "set" function,
which puts your request into a queue and returns immediately, regardless of
whether the work has been done or not. If you set items too fast, the queue
will be full and the exception is thrown out. One solution is to get the item
you have just set before setting another item, forcing
the program to wait until the work has been done.
e.g :
mc.set(x,y)
mc.get(x)
...
Original comment by linhu...@gmail.com
on 19 Mar 2012 at 12:23
Can someone verify that this issue is still present in Spy 2.8.x?
Original comment by mikewie...@gmail.com
on 3 Jun 2012 at 6:36
maybe this reason(all the versions):
net.spy.memcached.MemcachedConnection
public void addOperations(final Map<MemcachedNode, Operation> ops) {
for (Map.Entry<MemcachedNode, Operation> me : ops.entrySet()) {
final MemcachedNode node = me.getKey();
Operation o = me.getValue();
o.setHandlingNode(node);
o.initialize();
//!!! when exceptions here, Operations had been added can't be cancel or execute
node.addOp(o);
addedQueue.offer(node);
}
Selector s = selector.wakeup();
assert s == selector : "Wakeup returned the wrong selector.";
}
Original comment by syu....@gmail.com
on 29 Nov 2012 at 5:44
Original issue reported on code.google.com by
lakshmip...@gmail.com
on 4 May 2011 at 7:28