web3.py: Timeout error when I tried to send transaction
I don’t understanda why, but since few days, I can’t send transaction.
When I do web3.eth.sendTransaction(transaction) I’ve this error timeout: timed out.
the transaction looks like this : transaction = {'from': user2, 'to':user1, 'data': web3.toHex("test")}
And user1 and user2are defined . Accounts are unlocked and have gas…
Have you got any idea?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 19 (6 by maintainers)
For future readers who encounter this problem, one way to resolve it is by changing this:
To this:
As the default timeout is 10 (seconds).
@shanefontaine: It involves inter-process communication, so technically speaking, any time-duration is possible, especially when the communication is over HTTP. Evidently, they added the
timeoutconfiguration parameter, so there’s gotta be good reason for that, wouldn’t you agree? Practically, the reason I wrote this is because I ran into a sporadic timeout scenario, which I was able to resolve by increasing the timeout. By the way, it’s not about sending a transaction, it’s about receiving a response to it (on the client side, where you configure the timeout).I have the same problem here with geth as the node. I have an
HTTPConnectionPool()read timeout inlistener.get() > eth_getFilterChanges() > ....Any guidance on how to deal with these read timeouts if web3.py doesn’t?
I thought about wrapping
listener.get()with atry{} catch{}but iflistener.get()updates the last block it requested events from then we might miss some events.@pipermerriam , Yes I can access the RPC server because when I do or exemple
I’ve a response :
0x..or321815But when I want to do sendTransaction command I always have this error :
And with web.js I’ve the same result :