PHP Couchbase Client operation timed out

I’ve installed Couchbase 2.1.1 Enterprise edition on Server A, PHP Couchbase::Client on servers B and C. Servers B and C are setup identically on RHEL 5.8 and PHP 5.3.3.

I’m facing issue on server C wherein, I’m able to establish Couchbase connection but any subsequent Read and Write throws following error.

Failed to get a value from server: Operation timed out

Failed to store value to server: Operation timed out

Same script works on server B without any issues. Kindly help me resolve the issue I’m facing.

Hi Akumar.

Are you trying to remotely connect to Server 3 through amazon AWS by any chance? This has shown me the same timeout error you have received previously.

If not, please let me know a little more about your server architecture and I will try to diagnose any problems.

Many thanks,

Robin J.

Could you post your PHP code, you are using to connect there?

Thanks Robin!!!

No I’m not using AWS. 3 servers mentioned are different VM on single server.

Server A is on CentOS 6.4 and has Couchbase 2.1.1 Enterprise edition installed.
Server B is on CentOS 6.3 and has PHP 5.3.3 installed.
Server C is on RHEL 5.8 and has PHP 5.3.3 installed.

Do let me know, if you need any more information.


Hi Avsej!!!

I’m using standard PHP code for connecting to Couchbase server from both B and C servers.

$cb = new Couchbase("XXX.XXX.XXX.XXX:8091", "Username", "Password", "Bucket", true);

Do let me know, if you need any more information.


It won’t work. Right now there no easy way to change username for bucket, therefore you should specify username equals bucketname. So that your example will be:

$cb = new Couchbase(“XXX.XXX.XXX.XXX:8091”, “Bucket”, “Password”, “Bucket”, true);

Thanks Sergey for the response!!! I’ll try your suggestion and revert.

The only concern I’ve is, if what you are saying is true then in my case the script should have thrown error from server B as well for all Reads and Write.


Hi Sergey,

As per your suggestion, I tried looking at options to change the User as bucket name. I couldn’t find any option to create a new User in couchbase-cli. Only option to add a user is available when you Add / Edit Node in a cluster.

I also tried below PHP code by changing username to bucket name, but without any success.

$cb = new Couchbase("XXX.XXX.XXX.XXX:8091", "Bucket", "Password", "Bucket", true);

Do let me know, if I’m missing something.