Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal exception: TypeError: proc.send is not a function #1120

Closed
damusix opened this issue Mar 7, 2022 · 2 comments · Fixed by #1122
Closed

Fatal exception: TypeError: proc.send is not a function #1120

damusix opened this issue Mar 7, 2022 · 2 comments · Fixed by #1122
Labels

Comments

@damusix
Copy link

damusix commented Mar 7, 2022

Trying to graceful shutdown a server that stops queues and workers before stop and am getting this error:

[exiting] Fatal exception: TypeError: proc.send is not a function
    at /project/node_modules/bullmq/src/utils.ts:150:10
    at new Promise (<anonymous>)
    at Object.exports.asyncSend (/project/node_modules/bullmq/src/utils.ts:149:10)
    at Object.exports.childSend (/project/node_modules/bullmq/src/utils.ts:163:21)
    at process.<anonymous> (/project/node_modules/bullmq/src/classes/master.ts:32:9)
    at process.emit (node:events:402:35)
    at process.emit (node:domain:475:12)
    at process.emit.sharedData.processEmitHook.installedValue [as emit] (/project/node_modules/@cspotcode/source-map-support/source-map-support.js:613:40)
    at process._fatalException (node:internal/process/execution:170:25)

Here is my graceful shutdown script:

export interface OurQueue extends Queue {

    scheduler?: QueueScheduler,
    worker?: Worker
}

const gracefulShutdown = async (queue: OurQueue, server: Server) => {

    const bullConnections = [
        queue,
        queue.worker,
        queue.scheduler
    ];

    for (const conn of bullConnections) {

        try { await conn?.close(); }
        catch (err: any) { server.log(['error'], err); }
    }

};
@TemaSM
Copy link

TemaSM commented Mar 8, 2022

Confirming issue.
Probably introduced by #1089
UPD: Downgrading to v1.74.0 helped.

github-actions bot pushed a commit that referenced this issue Mar 9, 2022
## [1.76.2](v1.76.1...v1.76.2) (2022-03-09)

### Bug Fixes

* **utils:** fix proc.send type ([#1122](#1122)) fixes [#1120](#1120) ([da23977](da23977))
@github-actions
Copy link

github-actions bot commented Mar 9, 2022

🎉 This issue has been resolved in version 1.76.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants