Skip to content

Invalid JSON RPC response: "" #559

Closed
@ppoliani

Description

Description

Sending many transactions to the RPC endpoint doesn't always end up running smoothly. I have a script that concurrently sends 1000-5000 transactions. The challenge in this case is to get the nonce right; so I've implemented a local nonce tracker that periodically re-syncs with the remote nonce.

The issue is that some of my transactions return:

Invalid JSON RPC response: ""

I use web3.js to send the transactions and more specifically the following function:

web3.eth.sendSignedTransaction(signedTx)
  .once('transactionHash', onData)
  .on('error', onError));

I find it hard to understand that the meaning of that error. I understand that regarding the nonce management. three thing can go wrong:

  1. Send a tx with a low nonce.
  2. Send a tx with the same nonce as a previously submitted tx
  3. Send a tx with a higher nonce than the current account nonce.

In the first situation, typically I should get Nonce too low. Second case should emit replacement transaction underpriced. Now regarding the third case, I'm not sure if it will cause Invalid JSON RPC response: "". I know that it will result in a nonce gap and some transactions will be stack in the transaction pool. The error message doesn't give me a hint if that's the case or if there is something else causing this issue.

Frequency: [What percentage of the time does it occur?]

Every time I send too many transactions in a concurrent way.

Versions (Add all that apply)

Software version:
besu/v1.3.8/linux-x86_64/oracle_openjdk-java-11

Java version: [java -version]

openjdk 11.0.2 2019-01-15
OpenJDK Runtime Environment (build 11.0.2+9-Debian-3bpo91)
OpenJDK 64-Bit Server VM (build 11.0.2+9-Debian-3bpo91, mixed mode, sharing
OS Name & Version:
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
Kernel Version:
Linux staging1 4.4.0-171-generic #200-Ubuntu SMP Tue Dec 3 11:04:55 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions