0

When I send about 100-120 requests in async, it is fine, the event will give me a response. But above 150 or so, I get "Invalid JSON RPC response: ""

Web3JS 1.2.1

Geth Info: Version: 1.8.12-stable Git Commit: bb0261036b768b26e7f63ebecdb5ae32c76f99bb Quorum Version: 2.2.1

8
  • How many nodes are you using?
    – cqx
    Aug 22, 2019 at 11:20
  • Currently using 5 nodes
    – kjroger94
    Aug 22, 2019 at 13:59
  • Can you show the code you are using?
    – cqx
    Aug 22, 2019 at 14:34
  • contractInstance.getPastEvents('create', { filter: { cid: addr, date: date, slot: slot}, fromBlock: 0, toBlock: 'latest' }, function (error, event) {})
    – kjroger94
    Aug 23, 2019 at 3:27
  • This code seems to be fine. Can you send the complete code?
    – cqx
    Aug 23, 2019 at 5:51

1 Answer 1

2

Geth is an ethereum client but it is not a high performance RPC server.

To resolve some calls like getPastEvents it has to traverse a lots of history. It was never designed to respond to thousands of queries per second.

If you want to achieve such performance it is better to store the events you are interested in a suitable database.

2
  • Pooling the Data once and then saving it in DB seems like a proper solution.
    – cqx
    Aug 23, 2019 at 14:20
  • would it be the same for a function to get data? Query via a function that gets the data from the index
    – kjroger94
    Aug 24, 2019 at 5:46

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.