Uploaded image for project: 'Spymemcached Java Client'
  1. Spymemcached Java Client
  2. SPY-177

Memcached Bucket Drops Connection on Too Large Document

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • None
    • library
    • Security Level: Public
    • None

    Description

      When making a set with a document over 1 MB to Couchbase using the latest Java client to a Memcached-type bucket, an expected "Too Large" response is returned, but then the connection is dropped. The following application hangs on shutdown, and was compiled with the instructions at http://www.couchbase.com/communities/c-client-library. Other clients look to have similar behavior, so appears to be a server issue.

      import com.couchbase.client.CouchbaseClient;
      import java.net.URI;
      import java.util.Arrays;
      import java.util.List;
      import java.util.Date;
      import java.text.DateFormat;
      import java.text.SimpleDateFormat;
      import java.util.Calendar;

      public class App {

      public static void main(String[] args) throws Exception

      { List<URI> hosts = Arrays.asList( new URI("http://10.4.2.57:8091/pools")); // Name of the Bucket to connect to String bucket = "TestBucket"; // Password of the bucket (empty) string if none String password = ""; CouchbaseClient client = new CouchbaseClient(hosts, bucket, password); int[] intArray = new int[1048576 * 2]; for (int i=0; i < (1048576 * 2); i++) intArray[i] = i; System.out.println("length is" + intArray.length); // Store a Document client.set("my-first-document", intArray).get(); // Retreive the Document and print it System.out.println(client.get("my-first-document")); // Shutting down properly client.shutdown(); System.exit(0); }

      }

      Response:

      2014-06-23 11:36:15.120 ERROR net.spy.memcached.protocol.binary.StoreOperationImpl: Error: Too large
      Exception in thread "main" 2014-06-23 11:36:15.122 WARN net.spy.memcached.protocol.binary.BinaryMemcachedNodeImpl: Discarding partially completed op: Cmd: 1 Opaque: 7 Key: my-first-document Cas: 0 Exp: 0 Flags: 3 Data Length: 4210182
      2014-06-23 11:36:15.123 INFO com.couchbase.client.CouchbaseMemcachedConnection: Reconnection due to exception handling a memcached operation on

      {QA sa=/10.4.2.57:11210, #Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=5}

      . This may be due to an authentication failure.
      java.util.concurrent.ExecutionException: OperationException: SERVER: Too large
      at net.spy.memcached.internal.OperationFuture.get(OperationFuture.java:174)

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            daschl Michael Nitschinger
            jdillon Jeff Dillon (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty