Couchbase
  • Why NoSQL?
  • Couchbase Server
  • Download
  • Resources
  • Careers
Home | Forums | SDKs | SDKs

Membase not caching, returning status code 3, using .NET Membase Client API

1 reply [Last post]
  • Login or register to post comments
Fri, 01/20/2012 - 06:02
lionelhutz
Offline
Joined: 01/20/2012
Groups: None

I posted this question over at StackOverflow here:
http://stackoverflow.com/questions/8933666/membase-not-caching-returning...

I am using the .NET Membase Client API that includes Enyim.Caching. I have a DataTable that is approximately 5.5 megs and it is not getting cached. I know that memcached has a 1 meg limit per object, but I understand that any item less than 20 megs should be getting cached in Membase, but it isn't.

I debugged using the Membase and Enyim source code and found that a set request hits the membase server and a response is returned. The response header includes a status code of 3. Apparently a 0 is successful, but I have no idea what a status code of 3 is.

I initially thought the problem was due to it being a DataTable (serialization), but all my other DataTable objects are storing successfully (save 1 other).

Why isn't the object getting cached?

Top
  • Login or register to post comments
Tue, 01/31/2012 - 11:40
john
Offline
Joined: 01/05/2012
Groups: None

I posted a suggestion on StackOverflow, but I'll include it here as well:

Are you using a Memcached bucket or Couchbase bucket? If you're using a Memcached bucket then you're likely hitting the 1MB limit. A quick sample program:

var config = new CouchbaseClientConfiguration();
config.Urls.Add(new Uri("http://127.0.0.1:8091/pools/default"));
config.Bucket = "memcached";
config.BucketPassword = "qwerty";
var client = new CouchbaseClient(config);
 
var size = 1000000;
var sb = new StringBuilder();
for (int i = 0; i < size; i++) { sb.Append("z"); };
var data = sb.ToString();
var result = client.Store(StoreMode.Set, "foo", data);
Console.WriteLine(data.Length + ": " + result);

When the size variable is set to 1000000, result is true. When size is set to just over a MB, say 1100000, then result will be false. If you instead use a Couchbase bucket, you can set size to 20000000 and the result will be true. However, setting size to 21000000 will cause the Store operation to fail.

If you're not using a Memcached bucket, please let me know... Also, note that I'm using the .NET 1.0 client with 1.8 server for this sample.

-- John

Top
  • Login or register to post comments
  • Login or register to post comments
  • Login
  • Register

Company

  • About Us
  • Leadership
  • Customers
  • Partners
  • Contact Us

Product

  • Couchbase Server
  • Couchbase SDKs
  • Use Cases
  • Documentation
  • Forums

Open Source

  • Couchbase Project
  • Couchbase vs. CouchDB

Commercial

  • Subscriptions & Support
  • Training & Services

News

  • Blog
  • Newsletter
  • Press Releases
  • Buzz

Follow Us

    
  • Customer Login
  • Terms of Service
  • Privacy Policy
  • Trademark Policy
  • Site Map

© 2013 COUCHBASE All rights reserved.

Sign in to Couchbase Community

close
  • Create new account
  • Request new password
You are logging into the Forums, Wiki and Issue Tracker