we are currently using Couchbase 3.0.1 Community Edition with Couchbase Node Library 2.1.3.
We encounter random errors after performing a ViewQuery against the Cluster. (without recognizing any occurrence patterns)
The error message just says: “Error Parsing Failed”
The stacktrace looks like this:
DatabaseError: unknown error : error parsing failed
at mapError (/app/node_modules/.../lib/couchbase.js:34:12)
at /app/node_modules/.../lib/couchbase.js:20:15
at ViewQueryResponse.<anonymous> (/app/node_modules/couchbase/lib/bucket.js:551:7)
at /app/node_modules/couchbase/lib/bucket.js:521:15
The corresponding code handles the parsing of the error to JSON and prints this message if JSON.parse(error) returns a falsy value. Could somebody elaborate on this?
Just encountered this issue too, but got a little more Background to it:
It happens if you put high concurrent load on a couchbase server and are querying a lot of views. A script with 8 Worker Threads, each executing around 30 views in parallel on each ‘run’ leads after a minute max to this issues ( only a restart of the script ‘recovers’ this error ). from a different script and web console the server is always available. We’re talking about a medium sized index and nothing else really happening.
Finally this results in the following Issues:
209239ms [I1] {3984} [DEBUG] (lcbio_mgr - L:271) <127.0.0.1:8092> (HE=0x1deafa0) Received result for I=0x1e7f6d0,C=(nil); E=0x2f
209239ms [I1] {3984} [ERROR] (connection - L:127) <127.0.0.1:8092> (SOCK=0x1e82320) Failed: lcb_err=0x2f, os_errno=99
Additional Info: File Limit is unlimited on Client and Server -> so this won’t kill the request. Also each Worker has only around 60 open Files / Sockets.
Best Regards and Thanks for your Hard Work
/// EDIT: Found the Reason -> ephemeral port reuse. Maybe this could be documented somewhere? It’s quiet important client side.
Any news on this? I’m experimenting the same exact problem, but the error gives no hint on what is happening.
I changed the SDK code in node_modules/couchbase/lib/bucket.js this way:
console.log('query to be run ', JSON.stringify({spatial: isSpatial,
ddoc: ddoc, name: name,
opts: qs.stringify(opts),
includedocs: includeDocs}));
console.log(JSON.stringify({vt: viewtype, ddoc: ddoc, name: name, q: q, emitter: emitter}));
console.trace(errCode, val);
and got these values:
query to be run {"spatial":false,
"ddoc":"remove",
"name":"last_check",
"opts":"startkey=%5B%22REDACTED%22%2C%22opportunity%22%2C0%5D&endkey=%5B%22REDACTED%22%2C%22opportunity%22%2C1425077006024%5D&stale=false",
"includedocs":false}
{"vt":"_view","ddoc":"remove","name":"last_check",
"q":{"startkey":"[\"REDACTED\",\"opportunity\",0]","endkey":"[\"REDACTED\",\"opportunity\",1425077006024]","stale":"false"},"emitter":{"_events":{},"_eventsCount":2}}
Trace: 23 null
Error 23 indicates that there was a timeout, usually due to network issues. Have you confirmed that your client is able to properly contact Couchbase Server from your application server? Are you able to perform CRUD operations?
Yes, the client contacts the server as the failing operation is only one among many which are succeeding, and the database is on the same machine of the application.
Excluding this problem, I can perform CRUD operations and access the web console.