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

Python SDK with Couchbase 1.8.1: broken pipe error after connection idles for a while

No replies
  • Login or register to post comments
Fri, 08/24/2012 - 17:10
dvu
Offline
Joined: 08/24/2012
Groups: None

Hello everyone,

I'm using Couchbase 1.8.1 and version 0.7.2 of the python client and I've encountered a minor problem.

I have a server written using the twisted library for python and I'm using couchbase as the database. A connection to couchbase is established using the unified client (couchbase.Couchbase) when the server starts up. The problem occurs when I let the server idle for awhile (maybe 10-20 minutes?). When I try to get a value from the database after idling for awhile, I get a socket.error from python and a broken pipe. This causes the database query to hang for 30 seconds before it finally returns the value. Queries work fine again after that, until I let it idle again, of course.

Any idea how I can resolve this issue?

I've tried establishing a new connection for each query but that causes a pretty substantial delay.

Is there a way to check if the connection is working before attempting a query?
Should I schedule a function that just queries the database every minute or so to make sure the connection stays a live?

Any help would be appreciated!

Thanks!

Top
  • 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