You don't have any error listeners assigned to redis
On Wednesday, February 29, 2012 at 10:25 AM, jason.桂林 wrote:
> If you run below code, and restart you redis server, you will got one or two
> uncaughtException, but no more errors any more, and then, the memory will
> growing very fast, I want to know why
>
> 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
> /**
> * This code will memory leak, if you restart redis server when the node
> process is running
> *
> * @author Gui Lin
> */
> var redis = require('redis').createClient();
>
> setInterval(function(){
>
> redis.multi()
> .zrangebyscore('timeup', 0, Date.now())
> .zremrangebyscore('timeup', 0, Date.now())
> .exec(function(err, data) {
> if(err) console.log(err.stack);
> if(data) data = data[0];
> });
> }, 1);
>
> process.on('uncaughtException', function(err) {
> console.log(err.stack);
> })
>
>
>
>
>
>
>
> --
> Best regards,
>
> Jason Green
> 桂林
>
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> (mailto:[email protected])
> To unsubscribe from this group, send email to
> [email protected]
> (mailto:[email protected])
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
--
Job Board: http://jobs.nodejs.org/
Posting guidelines:
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en