The way to handle this is to take the worker out of rotation on error, but
allow it to resolve the in flight requests, with a hard shutdown after a
timeout. This is a DoS liability, which is why I use my trycatch module,
https://github.com/CrabDude/trycatch, to safely catch errors without
requiring a restart.

Either way, you'll want to fix your exception quickly and make a best
practice to never throw errors to avoid the DoS liability.

Cheers,
Adam Crabtree


On Thu, Oct 24, 2013 at 5:16 AM, Rana Roy <[email protected]> wrote:

> Hi,
> I am using domain and cluster to catch the un-hanlded error in my
> application in domain and then close the worker cluster and forking a new
> worker cluster though master cluster. My problem is: if I am doing a load
> test of my service and hit the service continuously with huge number of
> requests and suddenly hit a request which I know is going to throw an
> unhandled error - I see domain and cluster is working good to close the
> worker thread and spawning a new worker. But the problem is by the time the
> domain gets the error and closes the request and master cluster forks a new
> worker , few of my requests are already landing in the bad workethread (the
> one which got an error event) - so they are failing as the worker gets
> closed there. Is there a way in cluster to retrieve the failed requests or
> handle this scenario in any other way?
>
> Thanks for your inputs.
>
> Thanks
> Rana
>
> --
> --
> 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
>
> ---
> You received this message because you are subscribed to the Google Groups
> "nodejs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Better a little with righteousness
       than much gain with injustice.
Proverbs 16:8

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to