PHP SDK 2.0.4 & Couchbase 3.0.2 Persistence


We will be upgrading soon from CB 1.8.1 to CB 3.0.2, we will be using PHP SDK 2.0.4 (latest from the time of writing).

We are currently using Memcache to connect to Couchbase, and now we plan on using the PHP SDK (and include the PHP library). In the documentation, I haven’t seen any sample or steps on how to have a persistent connection when using the PHP SDK to connect to Couchbase. Has it been overlooked?

Any help is really appreciated.


Hey makubex,

Due to the nature of Couchbase, non-persistent connections would have a serious impact on the performance of any scripts (this has been a prevalent issue in previous PHP drivers). In the 2.x series of Couchbase SDK’s, all connections are persistent when possible (as long as the PHP instance survives between requests, Couchbase connections will as well).

Cheers, Brett

HI Brett,

Thank you for a prompt answer!

So far, we are not putting the Couchbase 3.0.2 on production environment as of the moment (but soon we will). I’m just quite afraid that non-persistent connection will greatly slow down our sites. But as you have just said then it will not be an issue.

I’ll reply again if the roll out will be a success.

Thanks again,