You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey, been using memcache-client since September in our open-source project, mostly everything has been great so thank you! I've encountered an unusual error that has occurred ~50 times on our servers over the last month, which crashes it due to an uncaught exception.
The stack trace goes like this:
TypeError: Cannot set properties of undefined (setting 'error')
/server/node_modules/memcache-client/dist/lib/connection.js in MemcacheConnection.receiveResult at line 188:32
retrieve.results[pending.cmdTokens[1]] = {
tokens: pending.cmdTokens,
casUniq: pending.cmdTokens[4],
value: (_a = this.client) === null || _a === void 0 ? void 0 : _a._unpackValue(pending),
};
}
catch (err) {
>>>Exception>>>> retrieve.error = err;
}
}
delete pending.data;
}
shutdown() {
this._shutdown("Shutdown requested");
}
/server/node_modules/memcache-parser/dist/lib/memcache-parser.js in MemcacheConnection._copyPending at line 157:26
/server/node_modules/memcache-parser/dist/lib/memcache-parser.js in MemcacheConnection._parseCmd at line 101:29
/server/node_modules/memcache-parser/dist/lib/memcache-parser.js in MemcacheConnection._processData at line 197:25
/server/node_modules/memcache-parser/dist/lib/memcache-parser.js in MemcacheConnection.onData at line 28:25
node:events in Socket.emit at line 514:28
node:domain in Socket.emit at line 488:12
node:internal/streams/readable in addChunk at line 376:12
node:internal/streams/readable in readableAddChunk at line 349:9
node:internal/streams/readable in Readable.push at line 286:10
node:internal/stream_base_commons in TCP.onStreamRead at line 190:23
The text was updated successfully, but these errors were encountered:
cryptojcdenton
changed the title
TypeError: Cannot set properties of undefined (setting 'error') on unknown CLIENT_ERROR bad command line format
TypeError: setting 'error' on unknown CLIENT_ERROR bad command line formatNov 7, 2023
There was a command the server rejected with "bad command line format" error. That caused this handler to be invoked, which remove the command from queue
Confirmed that this error is only appearing on high server load on 1.0.5, when we have a period of hundreds of requests hitting memcached per second. We had a recent spike of traffic and this error happened again after going away for a few days, crashing our server.
Will continue to debug, but it might be some form of concurrency issue since we share a memcache-client across all requests on the server!
Hey, been using
memcache-client
since September in our open-source project, mostly everything has been great so thank you! I've encountered an unusual error that has occurred ~50 times on our servers over the last month, which crashes it due to an uncaught exception.The stack trace goes like this:
It appears that
retrieve
can be null here: https://github.com/electrode-io/memcache/blob/master/packages/memcache-client/src/lib/connection.ts#L235, when corresponding withCLIENT_ERROR bad command line format
. I don't know the specific command that causes thisCLIENT_ERROR
, but regardless, the memcache client crashes as a whole. Initially I increased maxConnections, as I thought it was some networking error.Any ideas? Thanks!
Confirmed this error persists on 1.0.5.
The text was updated successfully, but these errors were encountered: