mana-ethereum / ethereumex

Elixir JSON-RPC client for the Ethereum blockchain 0x063D3d782598744AF1252eBEaf3aA97D990Edf72
MIT License
378 stars 73 forks source link

Weird http pooling related error after v0.6.patch upgrade #81

Closed izelnakri closed 3 years ago

izelnakri commented 3 years ago

Hi there,

After upgrading ethereumex from v0.6.0 to v0.6.1 my test suite fails/gets stuck with some odd error. After some debugging I find error to be a very implicit/fundamental change in the way http pool is handled due to internal httpoison upgrade:

https://github.com/izelnakri/eth/blob/master/test/support/eth_client.exs#L13 https://github.com/izelnakri/eth/blob/master/test/support/eth_client.exs#L42 -> following code first returns hundreds/thousands of {:error, :econnrefused} while waiting for the spawned processes/ganache-cli http server to start and then it subsequent requests dont seem to get sent, and I assume the previous ones on the pool now returns {:error, :checkout_timeout} after ganache-cli starts serving the requests.

I'm still digging to see what has changed, the test suite doesnt work on the latest ethereumex as well. Most likely, our http pooling logic has changed and needs adjustments. I'll share more information once I have better understanding.

More info on the {:error, :checkout_timeout}: https://github.com/edgurgel/httpoison/issues/359

ayrat555 commented 3 years ago

Your pr was merged and httpoison was bumped to 1.7 in 0.7.0