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

Persistent connections default in PHP extension?

1 reply [Last post]
  • Login or register to post comments
Fri, 08/10/2012 - 14:25
mikelevy
Offline
Joined: 09/19/2011
Groups: None

I'm a little confused about the persistent connections part of the Couchbase PHP extension. In the documentation, it says in section 3.1.1.1.1 of the Couchbase SDK PHP 1.0 doc (http://www.couchbase.com/docs/couchbase-sdk-php-1.0.pdf) it says

In ext/couchbase connections are persistent by default and you can turn them off with the second optional parameter to __construct() and setting it to false.

This is echoed in the next section, 3.1.1.1.1.1, where it says

This is a relatively expensive call and that's the reason why we use persistent connections by default, so that this call doesn't have to be made more often then necessary, and most importantly not on every user-request.

However, later in the documentation, in Chapter 5 there's a section at the beginning of the chapter talking about the $object->new Couchbase() method. When explaining the parameters that are passed in to the new Couchbase() function, it says

The parameters you use include host:port, username, password, bucket name, and a boolean. The boolean set to true indicates that you want to create a persistent connection. By default connections are not persistent.

So in two different places it says persistent connections are true by defualt and in one section it says that persistent connections are false by default. I want to say that they're true by default, but I want to be sure.

Anyone have any insight into this?

Top
  • Login or register to post comments
Wed, 08/15/2012 - 12:03
daschl
Offline
Joined: 05/19/2012
Groups: None

Thanks for the insight on the documentation, this needs to be fixed!

I can tell you that connections are non-persistent by default. If you're curious, you can look at the code here (it's the master branch, but the behavior hasn't changed IIRC): https://github.com/couchbase/php-ext-couchbase/blob/master/couchbase.c#L...

Regards,
Michael

@Matt, can you make sure this will be fixed in the docs accordingly?

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