IntersectMBO / cardano-node

The core component that is used to participate in a Cardano decentralised blockchain.
https://cardano.org
Apache License 2.0
3.06k stars 721 forks source link

[BUG] - Resource exhausted error on parallel querying the testnet node (Bug or Intended behavior?) #3492

Closed nabinpkl closed 2 years ago

nabinpkl commented 2 years ago

External otherwise.

Area Other : Cardano test node query

Summary I was trying to measure the concurrent performance of a nft market place. When querying the testnet node in parallel it fails to give response to some of the query requests. This issue can be basically reproduced by running background sub-processes in bash for querying the node. Some processes fails with error : For command for x in {1..20} ; do cardano-cli query utxo --address $(cat default.addr) --testnet-magic 1097911063 & done;

Some processes return cardano-cli: Network.Socket.connect: <socket: 11>: resource exhausted (Resource temporarily unavailable)

Steps to reproduce Steps to reproduce the behavior:

  1. Start the cardano node with testnet configuration.
  2. Run the following bash command for your own address e.g default.addr is used in below command for x in {1..20} ; do cardano-cli query utxo --address $(cat default.addr) --testnet-magic 1097911063 & done;
  3. See below error for number of sub processes

cardano-cli: Network.Socket.connect: <socket: 11>: resource exhausted (Resource temporarily unavailable) [1] Done cardano-cli query utxo --address $(cat default.addr) --testnet-magic 1097911063 [2] Exit 1 cardano-cli query utxo --address $(cat default.addr) --testnet-magic 1097911063 [4] Done cardano-cli query utxo --address $(cat default.addr) --testnet-magic 1097911063 ... And so on with multiple fails and passes. Above we can see some process are returning exit 1 with failed condition.

Expected behavior Is it intended behavior as not to overload the node with bombarding of request or is it a bug? Expected behavior would be all query returns utxos successfully eventually.

System info:

Screenshot image

nabinpkl commented 2 years ago

Now on vasil testnet running the following commands shutdowns the node. for x in {1..20000}; do cardano-cli query tip --testnet-magic 9 & done; image

Jimbo4350 commented 2 years ago

Closing this. If this is still relevant please reopen.

infrmtcs commented 1 year ago

@Jimbo4350 I'm running inputoutput/cardano-node 1.35.5 docker image and can also reproduce the issue above by running cardano-cli inside the docker container. Is this an intended behaviour, or can we somehow configure max number of connections?