api.steemit.com: get_ops_in_block(2889020, false) times out
Apologies if this bug is in the wrong repo; it may be a jussi/redis issue as I am testing against api.steemit.com.
This API call consistently fails, however fetching the block just before it or the block just after it works fine.
http -j post https://api.steemit.com jsonrpc=2.0 id=1 method=condenser_api.get_ops_in_block params:='[2889020, false]'
...a few seconds later...
HTTP/1.1 200 OK
Access-Control-Allow-Headers: DNT,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range
Access-Control-Allow-Methods: GET, POST, OPTIONS
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 175
Content-Security-Policy: upgrade-insecure-requests
Content-Type: application/json
Date: Mon, 05 Nov 2018 16:30:10 GMT
Server: nginx
Strict-Transport-Security: max-age=31557600; includeSubDomains; preload
x-amzn-trace-id: Root=1-5be0700f-f8afeb1dab5eff9d8cd5e6bf
x-jussi-error-id: 1c111a27-9f1b-455c-9b80-80c46f2b0c6f
x-jussi-request-id: 000614885937782635
{
"error": {
"code": 1000,
"data": {
"error_id": "1c111a27-9f1b-455c-9b80-80c46f2b0c6f",
"jussi_request_id": "000665188251882723"
},
"message": "Request Timeout"
},
"id": "1",
"jsonrpc": "2.0"
}
sneak nostromo-2 ~ time http -j post https://api.steemit.com jsonrpc=2.0 id=1 method=condenser_api.get_ops_in_block params:='[2889019, false]' > /dev/null
real 0m1.004s
user 0m0.188s
sys 0m0.042s
sneak nostromo-2 ~ time http -j post https://api.steemit.com jsonrpc=2.0 id=1 method=condenser_api.get_ops_in_block params:='[2889021, false]' > /dev/null
real 0m0.497s
user 0m0.190s
sys 0m0.044s
sneak nostromo-2 ~ time http -j post https://api.steemit.com jsonrpc=2.0 id=1 method=condenser_api.get_ops_in_block params:='[2889020, false]' > /dev/null
real 0m3.485s
user 0m0.189s
sys 0m0.043s
sneak nostromo-2 ~
Note that this is a blocking issue that prevents my client from fully downloading the operations of the blockchain up to last_irreversible and thus my local db fails to sync and my app can't function.
IIRC, this is a hardfork block that contains a large number of virtual ops. The call works directly against a steemd node. This fix this on api.steemit.com, Jussi should have an increased timeout on this call and cache this call for an extended period of time.
As a workaround, I suggest calling condenser_api.get_block on this particular block as long as your app is not relying on virtual ops.
It does depend on virtual ops, so I'll wait for a fix in the service
Seems to work now with a bigger timeout. Thanks!
Fixed for 2889020, broken for 26038153 however - reopening.
I thought this kind of thing was fixed in jussi config, not steemd. Please note, the entire list of blocks that might need a bigger timeout is right here:
https://github.com/steemit/steem/issues/2913#issuecomment-423788587
Edit: Well, I thought it was the entire list. But it's missing 2889020. :p