memcachier / memjs

A memcache client for node using the binary protocol and SASL authentication
MIT License
197 stars 52 forks source link

New timeout handling to fix issue #52 #86

Closed dterei closed 8 years ago

dterei commented 8 years ago

Few different people reported issue #52, this commit fixes it.

Basically what would occur is if you ran the following:

for (i = 0; i < 20; i++) {
    mc.set('key', 'value');
}

You'd get an exception as Node doesn't like you creating more than 11 timeouts by default, and we'd try to create 20. We could increase the number of timeouts allowed (to infinite), but this design seems nicer, to just use one timeout and track deadlines in a queue.

We also bump to version 0.9.2.

alevy commented 8 years ago

This seems fine, but because it changes a pretty core part of the request handling, maybe it's best to bump to 0.10 instead? It looks pretty solid and seems well tested, but the current timeout handling was the result of some pretty gnarly edge cases that came up in deployment.

dterei commented 8 years ago

Sure, happy to bump to 0.10.