-
Notifications
You must be signed in to change notification settings - Fork 9
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
engine: Regularly purge worker threads #411
Comments
Refinement #1: purge on complete Refinement #2: maybe rate limit attempts, or purge before claim, or purge every 10 claims, or something @stuartc is very worried that this is going to blow the stack quickly. Let's keep an eye on it, but I think we'll be looking at switching worker library very quickly. |
This was referenced Oct 27, 2023
Purge on complete is implemented, with logs and emitted events so we have some visibility. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The latest worker version will bypass node's module caching when importing adaptors.
This ensures an isolated environment, which is super great, but will result in a memory leak as old adaptors will not be unloaded/tidied/gc'd.
A good solution to this, which is also quite a nice security policy, is to regularly burn worker threads by calling workerpool.terminate().
We should:
We can unit test on the emitted event.
Spinning this out into an issue because I don't think I can do this before I travel today.
The text was updated successfully, but these errors were encountered: