Web3.js: Ethereum node increase number of open files when calling contract

Created on 10 Oct 2019  路  8Comments  路  Source: ChainSafe/web3.js

Description

I have a one-node parity network running locally and I am making calls to my deployed smart contract and I am getting odd behaviour at node. The number of open files of the node increase more and more until gets the maximum number permitted. Parity node is able to decrease the number and get the same amount of open files as before (approximately). The point is that this recover happens with nodejs program is finished, not when web3 calls finish. It is like web3 cannot close the connection...

This problem makes parity node increase number of open files quickly and if gets the maximum stops to accept RPC requests...

Steps to reproduce the behavior

This is the scenario and the way to reproduce it:

  1. Deploy parity network
  2. Executes nodejs and web3.js script which does the following: makes a contract deployment and makes multiple variable state reads (call).
  3. Check number of parity open files before, during and after program execution.

Here is a video showing this: https://drive.google.com/file/d/1-n-he1crJiyeFnfrGvdQf8KV3Qjj6ZvX/view?usp=sharing

I have repeated the same sceneario using RPC calls without web3.js, and the number of open files does not increase, but remains constant. So, it seems a problem with web3.js...

Aside from this, I was checking web3 library and I found this suspicious thing: https://github.com/ethereum/web3.js/blob/1.x/packages/web3-providers-http/src/index.js#L128

Versions

  • web3.js: 1.2
  • nodejs: 8.9.4
  • ethereum node: Parity-Ethereum/v2.6.4-beta-badb045-20190926/x86_64-linux-gnu/rustc1.36.0

I tried with different web3, nodejs and parity versions...

Here you can find the code I use:
https://gist.github.com/miguelmartinezinf/df0f6eb81752b89f4c02e1dbd43d3441

1.x Stale clarification needed

All 8 comments

Thanks for opening this issue! Could you add the whole code as gist file?

@nivida thanks, I have updated the issue with a code gist.

any insight about this?

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment, otherwise this issue will be closed in 7 days

The issue persists... any update?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

@nivida is there any change to have a look on this?
thx in advance

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions. If you believe this was a mistake, please comment.

Was this page helpful?
0 / 5 - 0 ratings