You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But whenever this worker terminates or force killed like a server stop/restarts the queue failed event never triggered and I always get the error below.
@kenma9123 Does the SIG event trigger if your process is not long running?
I'm seeing a similar behavior, but in my case the SIGTERM event handler gets fired only after the child processor completes its work. This effectively prevents any interruption of the child process while it's working, which makes it hard to implement graceful shutdown logic.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
We are also using PM2 as main process manager, that starts a sandboxed processor.
When I do a pm2 restart all, the running processes wont be killed. IMO a restart should also kill the sub processes. (e.g. redeploy)
Our current code for that in the processor:
// setup proper exit handling
const shutdown = async () => {
// console.log('shutdown', e);
// ... do other tear down stuff in DB
process.exit(410); // parent gone
};
process.on('SIG', shutdown);
process.on('SIGTERM', shutdown);
process.on('SIGINT', shutdown);
Description
I have a worker in a separate process (sanboxed).
But whenever this worker terminates or force killed like a server stop/restarts the queue
failed
event never triggered and I always get the error below.sometimes its
Error: write EPIPE
Different from when I choose not to make it a separate process.
This setup always receive the
failed
event and no error. Is this normal, like does sandboxed never trigger thefailed
event or something was wrong?Minimal, Working Test code to reproduce the issue.
My worker is simple I can replicate it with this simple reject.
for this particular test I use
pm2
to start the app, and thenpm2 stop <name>
to properly trigger the SIGINT. But I think ctrl+c also works.To replicate, wait for a few seconds after the log
Job worker started
. Then terminate the process.Bull version
v3.13.0
Additional information
node v10.20.1
ioredis v4.16.2
The text was updated successfully, but these errors were encountered: