Nodejs sdk 3.1.1 - kvConnectTimeout is not being passed in options object from Cluster to Connection

Hi,

My first post here.

While attempting to try out NodeJS SDK 3.1.1 against a local Couchbase server 6.6. I came across a problem already reported by many here.

Error(‘cluster object has been closed’)

After Debugging I found out the real issue

failed to connect to bucket: [Error: LCB_ERR_TIMEOUT (201): The request was not completed by the user-defined timeout]

So, My local connection was being slow, so it got canceled. In order to get it to connect, I needed to increase the connected timeout.

After looking at the source code, The Cluster needed to pass a property KVConnectTimeout to the Connection obj (which is not happening). The connection obj is expecting this value already.

Setting up this value hardcoded, it works because it waits the time we set up, for the connection to be established.

Is someone already looking into this or is there another version that solves this in another way?

Many thanks,
P

Hello @Pedro_Dias I believe this ticket should fix it . Basically the cluster configuration options in this example kvconnectiontimeout was not being passed when you set it. The workaround is to pass it as an option via connection string.

Thank you for the info. Much appreciated.

1 Like