Hi, 

I'm using express.js and the domain module of node.js for handling uncaught 
exception. I start every worker of the cluster in it's own domain. When an 
uncaught exception occurs I use the error handler of the domain to log the 
error und destroy the worker. 

https://gist.github.com/3313918

But theres one problem with this solution: When a worker handling 10 
request at the same time and one of these requests causes an uncaught 
exception which causes the worker to die, what's about the remaining 9 
request? 

One solution could be to create a express.js middleware which wraps every 
request in it's own domain with it's own error handler. This way it should 
be possible to log the error, render an error page for only this one 
request. Could it be a problem not killing the worker process?

Thank you
Torben

-- 
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 nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to