-
Notifications
You must be signed in to change notification settings - Fork 361
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
LRU cache is not releasing thread on api.disconnect() if you've written to the chain. #6010
Comments
Yes this would be related to #5997 cc: @filvecchiato |
I can confirm it was introduced in 14.1.1 - downgrading to 14.0.1 fixed it for me. |
I just spent 2 hours debugging why chopsticks no longer exit cleanly... Please add some regression tests. |
Yes, we are actively getting this fixed ASAP and adding tests! |
PR is in and a patch release will be up soon |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue if you think you have a related problem or query. |
I'm submitting a ...
What is the current behavior and expected behavior?
In version 14.1.1, Node.js retains a thread after writing to the chain, even when api.disconnect() is called. While reading chain state behaves as expected, any write operation—such as a simple balances.transfer—prevents the Node.js process from terminating automatically. The attached WTFNode output shows that the hanging process originates in node_modules@polkadot\rpc-provider\cjs\lru.js:115.
I'm not entirely sure when this was introduced as I was previously on 10.11.2 but I suspect it's fairly recent - I noticed references to changes to the LRU cache in the last few commits.
api.disconnect() should gracefully release all resources. In a long-running process, this would result in a memory leak.
Please tell us about your environment:
Version:
Environment:
Language:
The text was updated successfully, but these errors were encountered: