enyim/EnyimMemcached — Issue #98: An asynchronous socket operation is already in progress using this SocketAsyncEventArgs instance.
Author: billrob
Created: 2012-03-02 00:34:11+00:00
State: open

When using the multi-get call we are occasionally receiving this error. It usually happens a few times in a row and then recovers.

Things of note:

We understand the memclient to be thread safe so we have set up our memcached client as a singleton.
We run about 30 memcached queries per second.
We are using version 2.11.0.0

I found this issue, https://github.com/enyim/EnyimMemcached/issues/94 but it really doesn't seem to apply to us. Any assistance would be helpful.

We might change to instance based, but the pool management might be handled as a singleton anyway under the covers.

System.InvalidOperationException: "An asynchronous socket operation is already in progress using this SocketAsyncEventArgs instance.";
at System.Net.Sockets.SocketAsyncEventArgs.StartOperationCommon(Socket socket)
at System.Net.Sockets.Socket.ReceiveAsync(SocketAsyncEventArgs e)
at Enyim.Caching.Memcached.PooledSocket.AsyncSocketHelper.BeginReceive() in d:\d\repo\EnyimMemcached\Enyim.Caching\Memcached\AsyncSocketHelper.cs:line 96
at Enyim.Caching.Memcached.PooledSocket.AsyncSocketHelper.Read(AsyncIOArgs p) in d:\d\repo\EnyimMemcached\Enyim.Caching\Memcached\AsyncSocketHelper.cs:line 81
at Enyim.Caching.Memcached.Protocol.Binary.BinaryResponse.ReadAsync(PooledSocket socket, Action`1 next, Boolean& ioPending) in d:\d\repo\EnyimMemcached\Enyim.Caching\Memcached\Protocol\Binary\BinaryResponse.cs:line 99
at Enyim.Caching.Memcached.Protocol.Binary.MultiGetOperation.DoReadAsync() in d:\d\repo\EnyimMemcached\Enyim.Caching\Memcached\Protocol\Binary\MultiGetOperation.cs:line 96
at Enyim.Caching.Memcached.MemcachedNode.ExecuteOperationAsync(IOperation op, Action`1 next) in d:\d\repo\EnyimMemcached\Enyim.Caching\Memcached\MemcachedNode.cs:line 502
at Enyim.Caching.MemcachedClient.PerformMultiGet[T](IEnumerable`1 keys, Func`3 collector) in d:\d\repo\EnyimMemcached\Enyim.Caching\MemcachedClient.cs:line 911