exec(function(err, data){}) this won't listen error?
在 2012年2月29日 下午7:56,Arnout Kazemier <[email protected]>写道:
> 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
>
> 123456789101112131415161718192021
>
> /**
> * 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]
> 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
>
>
> --
> 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
>
--
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]
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