Is operation timeout shared accross instances of CouchbaseBucket?

Our application uses two instances of CouchbaseBucket class. At the moment both instances are connecting to same Couchbase cluster (on dev environment). It seems that if we set operationTimeout for one of them then the settings is somehow propagated also to the other instance of CouchbaseBucket (at least if I call magic get $this->operationTimeout).

Hello @brett19 can you advise?

Hey mpe,

Due to performance considerations, opening two connections to the same bucket internally uses the same connections and thus the same settings. This is a side-effect of the connection sharing that occurs between multiple php scripts which amortizes the cost of connecting to couchbase and significantly improves script execution time.

Cheers, Brett

1 Like

I was thinking that the optimization could be the cause. Thanks for confirmation