I’ve recently installed couchbase php extension (2.0.5) and can’t see any runtime variables with php -i, except for version and the fact it parsed additional ini file (couchbase.ini)
I am using centos 6.6 , libcouchbase 2.4.8 and libevent-last-2.0.21 (remi), php 5.5.23
php -m shows the module is loaded as well as phpinfo() or php -i, however no other details I see for the module settings.
(I seen something similar in internet, but there was no reply to the problem)
Please see the ticket you opened here where I answered this question.
I only can’t find where the cache settings went to…or it’s now handled a different way?
If you run your PHP under mod_php or fastcgi, where the extension persists beyond a single request, it may not be necessary to use configuration cache. However, if you are still interested in it you can add it to your connection string.
Here is an example:
$cluster = new CouchbaseCluster('couchbase://10.0.0.1,10.0.0.2?config_cache=/tmp/phpcb_cache');
Thanks a lot Brett!
Now I know kung-fu
Hi, we just tried to pass the configurations via DSN and it’s not working at all. CB server version 3, php sdk version 2.0.7.
We are in the same boat. SDK 2.0.7 PHP 5.5 (CentOS 6.6) Tried passing the cache params via query. The cache files never appear in the directory. We also tried keeping the config in php.ini like the previous versions and it did nothing. Anyone find a solution? It’s clear our connections have more than doubled from a web box to the cluster.
for whom it concerns the following works :
$md5Connection = md5($this->couchbaseClusterName.'_'.$this->couchbaseBucketName);
$couchbaseCluster = new CouchbaseCluster('couchbase://'.$this->couchbaseClusterName . '?detailed_errcodes=1&config_cache=/tmp/couchbase_'.$md5Connection.'.cache');
$this->couchbaseBucket = $couchbaseCluster->openBucket($this->couchbaseBucketName);
— Beware that you use a different cache file name for every cluster you wish to use… otherwise couchbase server WILL CRASH constantly!! … experienced this on a production system.
servers will spill out constant segfaults :
Service ‘memcached’ exited with status 139. Restarting. Messages: 2017-02-28T15:29:05.135629Z WARNING /opt/couchbase/bin/memcached(_ZN15google_breakpad16ExceptionHandler12GenerateDumpEPNS0_12CrashContextE+0x3d4) [0x45ac84]
2017-02-28T15:29:05.135635Z WARNING /opt/couchbase/bin/memcached() [0x45ae85]
2017-02-28T15:29:05.135640Z WARNING /opt/couchbase/bin/memcached(_ZN15google_breakpad16ExceptionHandler13SignalHandlerEiP9siginfo_tPv+0x97) [0x45afc7]
2017-02-28T15:29:05.135648Z WARNING /lib/x86_64-linux-gnu/libpthread.so.0() [0x7f315614d330]
2017-02-28T15:29:05.135654Z NOTICE 1077: HELO [libcouchbase/2.6.4, PCBC/2.2.2] TCP NODELAY [ 192.168.10.60:53672 - 192.168.13.102:11210 ]
[37494848.058313] mc:worker 12: segfault at 0 ip (null) sp 00007f1e0f7eeb28 error 14 in memcached[400000+8a000]
I was using a memcache and a couchbase bucket, but they were pointing to the same cache, this will equal in a constant crash of your servers!!!
just wanted to share this experience, had it on couchbase 4.5 community, latest pecl + libcouchbase version.