A simple, asynchronous, single-threaded memcached client written in java.
Java Other
#12 Compare This branch is 12 commits ahead of dustin:master.
Latest commit fd7e071 Mar 24, 2016 @daschl daschl committed with daschl SPY-191: Don't force reconnect on E2BIG with binary protocol.
In the current codebase, a socket is forcefully reset when the server
returns an E2BIG response, that is when the document is larger than the
possible value size.

While this needs to be done on the ASCII protocol, doing so is not needed
with binary protocol and can be considered a bug/leftover.

The code is modified so that E2BIG just translates into a non-success response
like any other error and the proper error code identifies the cause.

The test cases have been modified for binary to reflect the change.

Do not force reconnect / treat the issue as a server error on the binary
protocol - the ASCII protocol is unaffected.

Change-Id: Idf392d146d30b2e96dc198a93a3cc6598dae3fc6
Reviewed-on: http://review.couchbase.org/61927
Reviewed-by: Simon Baslé <simon@couchbase.com>
Tested-by: Michael Nitschinger <michael.nitschinger@couchbase.com>
Reviewed-by: Sergey Avseyev <sergey.avseyev@gmail.com>



Spymemcached can be compiled using Apache Ant by running the following command:


This will generate binary, source, and javadoc jars in the build directory of the project.

To run the Spymemcached tests against Membase Server run the following command:

ant test -Dserver.type=membase

To test Spymemcached against Membase running on a different host use the following command:

ant test -Dserver.type=membase \


The latest version of spymemcached has a set of command line arguments that can be used to configure the location of your testing server. The arguments are listed below.


This argument is used to specify the ipv4 address of your testing server. By default it is set to localhost.


This argument is used to set the ipv6 address of your testing server. By default it is set to ::1. If an ipv6 address is specified then an ipv4 address must be specified otherwise there may be test failures.


This argument is used when memcahched is started on a port other than 11211


This argument is used for CI testing where certain unit tests might be temporarily failing.

More Information

For more information about Spymemcached see the links below:

Project Page The

Spymemcached Project Home contains a wiki, issue tracker, and downloads section.


The gitub page contains the latest Spymemcached source.


At couchbase.org you can find a download's section for the latest release as well as an extensive tutorial to help new users learn how to use Spymemcached.