0

I have a fully synced Binance smart chain node with a proxy_pass to nginx for external request.

The problem that i have is the JSON-RPC return "null" if i process a large amount of requests.

For example : If i process 5000 rq/sec, i will got "null" response for about 30 %. (Basic request like eth_getBlockByNumber or eth_getTransactionReceipt).

Server :

AMD Ryzen 7 3800X - 8c/16t - 3.9 GHz/4.5 GHz
64 GB ECC 2666 MHz
2×960 GB SSD NVMe in RAID 0
Bandwidth 250 Mbps Up/250 Mbps Down (tested)

Config.toml modifications:

NoPruning = true
MaxPeers = 1000

Nginx setup :

Server :

location = /node {
    proxy_pass http://127.0.0.1:8080/;
}

Nginx.conf

events {
        worker_connections 6000;
        # multi_accept on;
}

I didn't found anything weird in the logs of nginx or in the node log.

I wonder if is there any limitations built in Ethereum nodes or others thinks like that ...

Thanks in advance.

4
  • The geth client was designed to act as an Ethereum network client. It wasn't designed to answer a large number of rpc requests. Did you inspect the log generated by geth to understand where it is failing? Large providers like Infura have designed their own solution for scaling the system to a large number of requests.
    – Ismael
    Commented Mar 29, 2023 at 16:53
  • Thanks for your reply. I used log verbosity 5 but i didn't found anything weird like errors that not usual. I also watched the logs of nginx and tcp if there is any leak or stuffs like that. You mention infura infrastructure, so you think they use other thinks beside the http/ws served by geth ?
    – Mohammed
    Commented Mar 29, 2023 at 20:40
  • There is an article that shows how it was organized a few years ago trustnodes.com/2018/07/25/…. Obviously, they don't show much detail, but there's a clear separation between blockchain, storage, and endpoints layers.
    – Ismael
    Commented Mar 30, 2023 at 3:12
  • Thanks for the article. I've read all the docs about JSON-RPC Server, but there is not limitation of this kind. I found also this comment link. I will test this theory of running out of sockets or ports issued for a big amount of requests. Thanks for your help
    – Mohammed
    Commented Mar 30, 2023 at 4:46

1 Answer 1

0

After a lot of research, i found that nginx "reset connections" after 60 seconds.

When i reviews the configuration of reverse proxy, i found that i set this parameters that cause the problem :

location / {
    proxy_pass             http://127.0.0.1:8545;
    proxy_read_timeout     60;
    proxy_connect_timeout  60;
    proxy_redirect         off;
}

So, i delete all and i kept only proxy_pass and the problem was gone.

location / {
    proxy_pass             http://127.0.0.1:8545;
}

Thanks @ismael for your help.

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.