I am performing some benchmarking with the Ethereum Virtual Machine. I have a contract with just one function that calculates the prime numbers until 100k. However, I am not able to get my results as the execution in geth is limited to 5 seconds. When I try to perform a call, I get the following error:

{"jsonrpc":"2.0","id":68,"error":{"code":-32000,"message":"execution aborted (timeout = 5s)"}}

The gas limit is not a problem here, I increased it (in the genesis block) to a large enough value so it would not impact the execution. I initialized geth with the following command:

geth --datadir=./data/ --networkid 68 --rpc.gascap 100000000000 --http --allow-insecure-unlock console

I thought the problem might be their VM so I tried using a different instance of the EVM called evmone using the --vm-evm option, but it didn't help with anything. Also, geth does not provide any command-line options to set the timeout. There are --metric options though, but I do not think they have any relation.

I just need to increase the timeout limit to a large enough value in order to perform my experiments. I hope this limitation is not hard-coded and there is some solution.

Can you help?

2 Answers 2


Ran into the same problem. Looking at the code, there seems to be a hardcoded timeout to 5 seconds.

  • 1
    Not sure, what revision you pointed at, but as of github.com/ethereum/go-ethereum/blob/… it seems to come in a parameter. Now Where does the value come from?
    – Huge
    Aug 9, 2021 at 17:16
  • 1
    @Huge I edited the link using a branch. If you see where the function was called from you'll end up with a hardcoded 5*time.Second further up the stack ;)
    – laurids
    Aug 23, 2021 at 11:39

You can run geth with the --rpc.evmtimeout flag to change the 5s timeout. If you set it to 0 , then timeout will be infinite. Check geth --help for more info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.