memcached
memcached copied to clipboard
callback did not fire if get/set connection timeout
to test memcached locally, i use below configurations
{ poolSize: 1, timeout: 1, retries: 0, retry: 100, debug: true }
since the timeout has been set to 1ms, i can see calls of set/get hangup frequently.
memcached.get(key, function (err, data) { // the hangup call missed callback });
there's only query command like "get xxx" been printed but not the response and END mark. the problem occurs less if enlarge the timeout.
set timeout to 1 might be stupid but i hope someone can explain to me why this may cause command execution no response?
by the way https://github.com/3rd-Eden/node-memcached/blob/master/lib/memcached.js#L310-L315
this.connect(server, function allocateMemcachedConnection(error, S) { if (memcached.debug) { query.command.split(LINEBREAK).forEach(function errors(line) { console.log(S.streamID
the S
might be undefined
here if error happened