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

Any idea to resolve: connection failure using client memcached

3 replies [Last post]
  • Login or register to post comments
Tue, 11/06/2012 - 01:52
Lara
Offline
Joined: 11/06/2012
Groups: None

Hi!
I'm doing some test with Couchbase server with the client of C. But when everything is running perfectly, the test stops saying that a "Connection failure" has happened.

My test is the next:
I have done a program which create a connection with the Couchbase server, insert data and after make some 'get's'. When I start with the 'get's', everything works great! But a while after, the server fails. The message of the error is "Connection failure".

I have written 'get's' because, really, i'm using the function lcb_make_http_request().
My idea is create a view at the same time that i'm inserting data. In order to do this, I use JSON and I store the data using lcb_store().
Now, I'm inserting 8GB of data. I did another prove with 1 GB and everything works perfectly.

Anyone can help me and give me any idea about the problem that I have?

Thanks a lot!!

Top
  • Login or register to post comments
Wed, 11/07/2012 - 02:01
trond
trond's picture
Offline
Joined: 03/15/2010
Groups: None

Could you post some code samples anywhere?

Cheers,

Trond

Top
  • Login or register to post comments
Thu, 11/08/2012 - 00:30
Lara
Offline
Joined: 11/06/2012
Groups: None

Thanks for replying!

Well, first of all I create the instance with: lcb_create(&instance, &create_options) where I have just given values to 'create_options'.
Then I initialize the connection with: lcb_connect(instance) and I wait until this work finish: lcb_wait(instance).
After this, I start inserting data with: lcb_store(instance,NULL,1,cmds) where 'cmds' have a JSON string, and again I wait: lcb_wait(instance).
This part of the programme works with any problem!!!
The problems start from here.
When I finish to insert data, I start to make 'gets' with: lcb_make_http_request(instance,NULL,LCB_HTTP_TYPE_VIEW,&http_cmd,NULL); where 'http_cmd' are correctly initialize.

This works fine, but in one moment, the request start to fail...
I think that Couchbase collapses o something like that, but I don't know how to fix that!

Any idea?
Thanks!

Top
  • Login or register to post comments
Sat, 11/17/2012 - 08:53
avsej
avsej's picture
Offline
Joined: 06/15/2011
Groups: None

do you mean you are making view request, parsing the result JSON and running GET queries along the way? or just execute view request and during result fetching receive the error in one of the callbacks?

you said that your server failed, right? what kind of error do you expect from the client in this case?

__________________

Find me on FreeNode IRC in #libcouchbase channel

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