We are using Couchbase Node.js SDK 3.0.1 against Couchbase 6.5 server.
Almost every developer has run into sporadic parent cluster objects has been closed errors on and off. During the initial startup of our express/node.js api server, this happens 100% of the time locally, no matter how long the couchbase server has been up. A restart of the api server, which uses couchbase node.js sdk and express, always seems to work.
However, we also see sporadic connection issues while hitting the API server, particularly if it’s in a transition state of starting up.
This gets the node.js server in a state where it’s unrecoverable.
Is there a way to recover gracefully in something like the code below where we are doing a sub-document mutate operation? All we are doing are using standard collections based apis according to the documentation.
Error: parent cluster object has been closed
at Connection._maybeBFwd (C:\Dev\JLLISNEX\jllis-api\node_modules\couchbase\lib\connection.js:181:13)
at Connection.mutateIn (C:\Dev\JLLISNEX\jllis-api\node_modules\couchbase\lib\connection.js:252:10)
at new Promise ()
at Function.wrap (C:\Dev\JLLISNEX\jllis-api\node_modules\couchbase\lib\promisehelper.js:29:12)
at Collection.mutateIn (C:\Dev\JLLISNEX\jllis-api\node_modules\couchbase\lib\collection.js:1082:26)
at Layer.handle [as handle_request] (C:\Dev\JLLISNEX\jllis-api\node_modules\express\lib\router\layer.js:95:5)
at next (C:\Dev\JLLISNEX\jllis-api\node_modules\express\lib\router\route.js:137:13)
[2020-04-29T10:21:36.959] [ERROR] jllis-api - ::ffff:127.0.0.1 - - “PATCH /dataproducts/AAR-2/details HTTP/1.1” 500 81 “” “PostmanRuntime/7.24.0”