Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

125
Views
Get info about worker crash

I am using this code to handle cluster crashes in my node application

cluster.on('exit', function (worker, code, signal) {
  console.log("error in cluster",worker);
  console.log("cluster code",code);
  console.log("cluster signal",signal);
  const newFork = cluster.fork();
});

I am trying to get the reason for the worker going down but the data inside worker, code and signal parameters did not have any details about the error from what I could see. Is there any way to find what the reason for the crash is?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Listen to error event to get the error inside your fork.

const worker = cluster.fork();

worker.on("error", function(data) {
    constole.log("error in cluster", data);
})
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!