Config_cache triggers "Ephemeral bucket do not support Couchbase Views"

Hi everyone; I am testing a setup of six Couchbase 5.1 servers, connecting to it from two server instances each running as much as 20 PHP-FPM processes each. In an effort to improve performance and reduce the amount of connections to each Couchbase server (~3000 to each server when doing 40 web requests/sec), I added config_cache to my connection strings.
I have found that when using config_cache I can’t use MapReduce views: query() throws an Exception stating Ephemeral bucket do not support Couchbase Views (code 7). I am executing the query at a regular Couchabse bucket, and when removing that configuration option queries execute flawlessly.

Is there a problem in my connection string? All other operations seem to work fine and the cache file is actually created. In fact the error happens both using php-cli or php-fpm.

My code:

use Couchbase\Cluster;
use Couchbase\Bucket;
use Couchbase\PasswordAuthenticator;
use Couchbase\ViewQuery;

$user = /*username*/;
$password = /*password*/;
$bucket = /*bucket*/;
$hosts = [/*ip 1*/, /*ip 2*/, /*ip 3*/, /*ip 4*/, /*ip 5*/, /*ip 6*/];

$authenticator = new PasswordAuthenticator();
$authenticator->username($user)->password($password);

$implodedHosts = implode(',', $hosts);
$configCacheDir = sys_get_temp_dir();
$configCacheFile = 'couchbase';

$clusterInstance = new Cluster("couchbase://{$implodedHosts}?randomize_nodes=1&config_cache={$configCacheDir}/{$configCacheFile}_{$bucket}");
$clusterInstance->authenticate($authenticator);
$bucketInstance = $clusterInstance->openBucket($bucket);

$viewQuery = ViewQuery::from('accounts', 'accounts');
$bucketInstance->query($viewQuery);

PHP version: PHP 7.0.30-0ubuntu0.16.04.1 (cli) ( NTS )
PHP SDK: 2.4.7
libcouchbase: 2.9.2 (git: 0f7cb6fe8b81c66273bfdab304d0f63bb4490377)

Thanks in advance for any help you can give me.

Hi @diego, no, this is not intended behaviour. And looks like something was missed when we were adding support for ephemeral buckets. I need to make more checks, and I will get back here.

Thanks for report.

1 Like

Hi everyone; after reviewing the releases after my post and double-checking using SDK 2.6.0 and libcouchbase 2.9.5 I can confirm the issue is still happening.

I am not sure if this is important at all, or something to worry about, as maybe the advantages of using config_cache are not worth solving the issue. Can someone confirm a performance increase with using config_cache?

The issue will be fixed in libcouchbase 2.10.0. The patch is here: http://review.couchbase.org/100756

1 Like