Couchbase Node.js Client-Side timeout exceeded for operation, error code 23

I’m writing a simple Node.js API using express. My cluster connection appears to be working, and the bucket says that it’s connected, but upsert is returning the following error:

{"message":"Client-Side timeout exceeded for operation. Inspect network conditions or increase the timeout","code":23}

My org currently has production code connecting to a different bucket in the same cluster, running python, and that’s working fine, so I doubt it’s a port problem (I’m using AWS).

Here’s my connection code:

//Couchbase Server Details.
const bucket_name = 'bucket_name';
const cb_url = 'couchbase://my_url/';
const bucket_password = "my_password";

//set up couchbase
var couchbase = require('couchbase');
var cluster = new couchbase.Cluster();
var bucket = cluster.openBucket(bucket_name, bucket_password, function(err) {
	if (err) {
		console.log("error!" + err);
	} else {
		console.log("it worked!")

and here’s my upsert code

bucket.upsert(uuid.v4(), my_json_object, function (err, result) {
          if (err) {
            res.end(JSON.stringify({message: err}));
          res.end(JSON.stringify({message: 'transaction processed succesfully!'}));

I’ve tried all of the suggestions I found on Stack overflow and Couchbase forums and nothing has worked.

Thanks guys

Hey @sam.wilks92,

Could you provide a bit more detail about your server configuration? Usually the cause of these kinds of errors is the use of a node address in Couchbase which is only accessible from the ‘database’ side of your network, causing your applications to be unable to speak to Couchbase. Another possibility is incorrect ports being allowed through the AWS instance firewall.

Cheers, Brett

Hey @brett19,

What configuration details do you need? We’re pretty bootstrapped right now, with one server (running below the minimum requirements) running a single node.

I set up another couchbase server on a different aws instance and it’s working fine now, although I couldn’t add the node to the cluster because of a “Failed to reach erlang port mapper”.

I’m assuming that both errors are because the instance is running below minimum requirements, but it would be good to get that confirmed