SDK 3.x development issues

Hello there,

I’ve been using couchbase alongside his node sdk for quite a while now (approx 2 years).
I’m currently working on a side project and trying to use the last sdk’s version.
I know it’s quite early to use in production and i wont, but i would like to report some things that i found in the 3.X version.

Is there a better place that this forum to do this ? i am in the right place ?

If so, here i go:

I randomly get the LCB_ERR_TIMEOUT (201): A request cannot be completed until the user-defined timeout fired
I dont get how to connect cleanly, the sdk seems to do it on his own, but then again, why would i get this error ?
This error seems to trigger the cluster to close all connections as we can see => cluster.js l500
Which trigger a top level error that i can catch => cluster was closed
Error: cluster object was closed
at Connection.close (node_modules/couchbase/lib/connection.js:211:25)
at node_modules/couchbase/lib/cluster.js:500:14

I dont know if i get this right (english is not my native language) but it seems that the connection was a failure and no request could reach my cluster / bucket / collection before the timeout that i should have set.
If it’s true:

  • how to set the timeout ?
  • why do i catch an error regarding cluster closing instead of an error about the connection failing ?

Looking forward this promise-friendly sdk, great work.

Theophile

Hey @theocat,

The best place to file issues is on our Official Bug Tracker at https://issues.couchbase.com/ . You can set the timeout on each operation through the options object you pass along. The timeout is specified in milliseconds (as you might expect in Node.js). I’ll look into your issue with the closed cluster, I made some changes to that handling in the 3.0.1 release and may have caused more issues with it. In general you do not see cluster connect errors, but rather timeouts for your operations as Couchbase Clients essentially takes part in the cluster and thus not being able to connect is considered a transient issue (ensuring that you have logging enabled is the defacto way to see cluster connection issues).

Cheers, Brett

1 Like