tedis
tedis copied to clipboard
uncaught exception: protocol tries to read unavailable data
at Function.byteLength (buffer.js:515:11)
at Protocol.parse (/home/gipsy/o/qdice/node_modules/tedis/src/core/protocol.ts:74:29)
at Socket.<anonymous> (/home/gipsy/o/qdice/node_modules/tedis/src/core/base.ts:133:23)
at Socket.emit (events.js:189:13)
at Socket.EventEmitter.emit (domain.js:441:20)
at addChunk (_stream_readable.js:284:12)
at readableAddChunk (_stream_readable.js:265:11)
at Socket.Readable.push (_stream_readable.js:220:10)
at TCP.onStreamRead [as onread] (internal/stream_base_commons.js:94:17)
My guess is that, on larger values, the socket stream's data event might not always send $<size> together with whatever is expected next, it might send it in two (or more) events. But base/protocol only knows to parse this at once. I tried to fix it but couldn't figure it out.
Can you provide case data, or the size of the data that caused the error?
We met the same issue here. When the string data size is kind of large (around 30000 chars), this error would occur randomly without any ways to handle.