EOSIO / eos

An open source smart contract platform
https://developers.eos.io/manuals/eos
MIT License
11.27k stars 3.6k forks source link

Response time is very HIGH when calling /v1/chain/get_info #8655

Closed congle-ibl closed 4 years ago

congle-ibl commented 4 years ago

Hi Team,

I'm running EOS fullnode with version 1.8.6. My node has synced successfully and up-to-date with latest block. But when calling /v1/chain/get_info, it takes a lot of time to response as below:

isysadmin@iblcore-sta-fn-eos3:~/EOS-Mainnet-V8-Parser$ curl http://127.0.0.1:8888/v1/chain/get_info -s -o /dev/null -w  "%{time_starttransfer}\n"
29.313328
isysadmin@iblcore-sta-fn-eos3:~/EOS-Mainnet-V8-Parser$ curl http://127.0.0.1:8888/v1/chain/get_info -s -o /dev/null -w  "%{time_starttransfer}\n"
29.500515

Here is my config.ini:

isysadmin@iblcore-sta-fn-eos3:~/EOS-Mainnet-V8-Parser$ cat config.ini 
agent-name = AgentName

#blocks-dir = "blocks"
chain-state-db-size-mb = 65536
reversible-blocks-db-size-mb = 65536
contracts-console = false

history-state-db-size-mb = 65536
history-index-state-db-size-mb = 65536  

http-server-address = 0.0.0.0:8888
p2p-listen-endpoint = 0.0.0.0:9876
p2p-server-address = 0.0.0.0:9876

http-validate-host = false
verbose-http-errors = true
abi-serializer-max-time-ms = 2000

#ver > 1.5.0
producer-threads = 16
net-threads = 16
chain-threads = 16
http-threads = 16

access-control-allow-origin = *
# access-control-max-age =
# access-control-allow-credentials = false

wasm-runtime = wabt

#produce-time-offset-us = 250000
last-block-time-offset-us = -300000

# Safely shut down node when free space remaining in the chain state database drops below this size (in MiB). (eosio::chain_plugin)
chain-state-db-guard-size-mb = 128
# Safely shut down node when free space remaining in the reverseible blocks database drops below this size (in MiB). (eosio::chain_plugin)
reversible-blocks-db-guard-size-mb = 2

#p2p-max-nodes-per-host = 4

filter-on = *:transfer

filter-on = eosio:newaccount
filter-on = eosio:delegatebw
filter-on = eosio:undelegatebw
filter-on = eosio:bidname
filter-on = eosio:buyram
filter-on = eosio:sellram
filter-on = eosio:buyrambytes
filter-on = eosio:regproducer
filter-on = eosio:unregprod
filter-on = eosio:voteproducer
filter-on = eosio:updateauth
filter-on = eosio:claimrewards
filter-on = eosio:refund

history-per-account = 1000
history-pubkey-block = 103223716
history-import-pubkeys = false

# SSL
# Filename with https private key in PEM format. Required for https (eosio::http_plugin)
# https-server-address =
# Filename with the certificate chain to present on https connections. PEM format. Required for https. (eosio::http_plugin)
# https-certificate-chain-file =
# Filename with https private key in PEM format. Required for https (eosio::http_plugin)
# https-private-key-file =

max-transaction-time = 10000

allowed-connection = any

max-clients = 0
connection-cleanup-period = 30
network-version-match = 0
sync-fetch-span = 2000
enable-stale-production = false

pause-on-startup = false
max-irreversible-block-age = -1
txn-reference-block-lag = 0

plugin = eosio::chain_api_plugin
plugin = eosio::chain_plugin
plugin = eosio::producer_api_plugin
plugin = eosio::history_plugin
plugin = eosio::history_api_plugin

# alohaeosprod: GB, London
p2p-peer-address = 172.105.224.240:9876
p2p-peer-address = eosbp-0.atticlab.net:9876
p2p-peer-address = p2p.bitmars.one:8080
p2p-peer-address = eosnode.b1.run:9876

Please help to take a look, thank you in advance. Best Regards,

bsilva122 commented 4 years ago

I'm having the same issue, please let me know if you find something. It's just terrible software. I could narrow it down to the number of peers, try to use only 1 or 2 peers at most, it might get better. Let me know the outcome please, still don't know what the problem is.

https://github.com/EOSIO/eos/issues/8656

matthewdarwin commented 4 years ago

If you want to process all incoming transactions on EOS-Mainnet, please use EOSIO 2.0 with EOS-VM or a faster CPU (4.5GHz is probably needed for 1.8 WABT). The volume of transactions is quite high on EOS Mainnet and will only grow.

Additionally change read-mode option if you don't need speculative.

spoonincode commented 4 years ago

Are you using a fork of eosio? history-state-db-size-mb is not a valid option in the eosio software provided by Block.one in this repository, and invalid config options should prevent eosio from starting.

lcgogo commented 4 years ago

I'm having the same issue, please let me know if you find something. It's just terrible software. I could narrow it down to the number of peers, try to use only 1 or 2 peers at most, it might get better. Let me know the outcome please, still don't know what the problem is.

8656

Meet the same issue, after about 1000 requests the response time up to 20s or more. Have to write a script to restart eos if met this situation. After restart, eos can response quickly in 20ms. However, after about another 1000 requests, the issue occurs again. Tried eos 1.8.4 and 1.8.9.

heifner commented 4 years ago

Resolved by https://github.com/EOSIO/eos/pull/8729

heifner commented 4 years ago

@allenhan2 please verify fix.

heifner commented 4 years ago

Related #8850

heifner commented 4 years ago

Resolved by #8894