Last active
March 21, 2017 20:50
-
-
Save shaharmor/7fbf9ef4cf606b06c214 to your computer and use it in GitHub Desktop.
ioredis memory leak
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Redis = require('ioredis'); | |
// single instance | |
//var redis = new Redis(); | |
// cluster | |
var redis = new Redis.Cluster([ | |
{ | |
"host": "127.0.0.1", | |
"port": 6380 | |
}, { | |
"host": "127.0.0.1", | |
"port": 6381 | |
}, { | |
"host": "127.0.0.1", | |
"port": 6382 | |
} | |
]); | |
var i = 0; | |
var key = 'key'; | |
function send() { | |
console.log(process.memoryUsage()); | |
for (var j = 0; j < 1000; j++) { | |
redis.set(key, i++); | |
} | |
} | |
setInterval(function() { | |
send(); | |
}, 500); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, are you still having this on 2.5.0? We had a similar issue (without clusters). Did you resolve it and if so how? Thanks.