Problem when connecting to multiple nodes from PHP

Hello,

I try to connect to a couchbase cluster with this way:
$cb = new Couchbase(array("ip-20-296-110-131.ec2.internal:8091","ip-20-254-129-133.ec2.internal:8091"), COUCHBASE_USER, COUCHBASE_PASS, COUCHBASE_VIEWS_BUCKET);

When the first node in the array is down, there isn't any other connection attempt to the second node in the array. This code line just returns after 3 seconds.
If I change the order of the nodes in the array, so that the good node will be the first one, then it connects immediately.

Why does the class behave like that? I thought it should connect to all of the nodes in the list.

Thanks,
Edi.

1 Answer

« Back to question.

Hey edibusl, what libcouchbase version do you have installed? There is a known issue with older libcouchbase versions which would cause this problem. I suggest updating your libcouchbase and php-ext-couchbase to the latest versions. Cheers, Brett