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

Memory leak in web3 contracts #135

Open
chancehudson opened this issue Dec 17, 2020 · 1 comment · Fixed by #157
Open

Memory leak in web3 contracts #135

chancehudson opened this issue Dec 17, 2020 · 1 comment · Fixed by #157

Comments

@chancehudson
Copy link
Member

Describe the bug
Web3 contract creation has a memory leak as described here. I've encountered this issue in other codebases that create contracts objects frequently.

The pattern used here should be replaced by a singleton type pattern that either creates the contract object or retrieves an in memory copy of the contract object.

In long running processes (like a coordinator) frequent requests to static functions retrieving a contract instance (like in a Worker) will cause a memory leak and eventual OOM crash.

@wanseob
Copy link
Member

wanseob commented Jan 21, 2021

This will be closed when this issue is fixed web3/web3.js#3866

@wanseob wanseob reopened this Jan 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants