3rd-Eden/node-memcached — Issue #30: TypeError: Cannot call method 'substr' of undefined
Author: ryan-roemer
Created: 2012-03-08 14:34:10+00:00
State: open

I've got a reasonable traffic and concurrency workload with a set of servers all hitting a single AWS ElastiCache memcached server. I encounter bunches of errors like the following:

/PATH/TO/node_modules/memcached/lib/memcached.js:357
, b: +tokens[2].substr(1)
^
TypeError: Cannot call method 'substr' of undefined
at Socket. (/PATH/TO/node_modules/memcached/lib/memcached.js:357:23)
at EventEmitter.rawDataReceived (/PATH/TO/node_modules/memcached/lib/memcached.js:484:50)
at EventEmitter.BufferBuffer (/PATH/TO/node_modules/memcached/lib/memcached.js:440:12)
at Socket. (/PATH/TO/node_modules/memcached/lib/utils.js:68:17)
at Socket.emit (events.js:67:17)
at TCP.onread (net.js:347:14)

I'm not sure what the underlying issues is, but could the `node-memcached` library permissively handle this and just bubble up an error instead, as the `TypeError` kills my entire node process. Thanks!