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

Option not to reuse child process #2422

Open
maxaggedon opened this issue Feb 13, 2024 · 2 comments
Open

Option not to reuse child process #2422

maxaggedon opened this issue Feb 13, 2024 · 2 comments

Comments

@maxaggedon
Copy link

maxaggedon commented Feb 13, 2024

Is your feature request related to a problem? Please describe.
When we started using bullmq to process jobs, we thought it would spawn a child process for each job. But we realised it does not...

Describe the solution you'd like
This would bring the advantage of not risking to have a memory leak induced by a dependency, as the child process memory would be released after each job.

Describe alternatives you've considered
We have patched it to exit the child process after each job, but it would be nice to have it as an official worker option

Additional context

@manast
Copy link
Contributor

manast commented Feb 13, 2024

Yes, the reason why it reuses the process is because it is slow to spawn a new process for every job. If you already have a solution it would be great if you could contribute with a patch, as long as the default stays the same as today it would work.

@wernermorgenstern
Copy link

I have noticed an issue regarding memory leak. Where services increase in memory, till NodeJS restarts, due to OOM.

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

No branches or pull requests

3 participants