-
Notifications
You must be signed in to change notification settings - Fork 157
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
/blocks/:height
sometimes always return error message for a block
#1081
Comments
It not affect other blocks, and the problem will gone after restarting the sidecar. So this maybe related with cache. |
Can you reliably reproduce this, or did the problem go away permanently for you? It may have been lucky timing; perhaps the Kusama node being queried was being too slow to respond for a while and it happened to improve before you restarted Sidecar? |
Unfortunate, I don't know how to reproduce it. It happens about once a week. In that situation, the rest api will respond that error immediately. Just like no new query was be made. |
happened again, here is more log:
|
hi, @jsdw . I found this error can not only happened on
|
Not only Kusama, many other chains has this error today. We are using the WS api of Onfinality. So this maybe related with their rate limit policy. Feel free to close this issue if it is WS's problem. |
Mmm, the logs do very much suggest that the node simply isn't responding in time. I have found in related sorts of queries that the RPC nodes can often get very slow and fail to respond within 60s. Perhaps have a go with pointing at a different RPC node, or in the worst case, run and sycn your own node so that the reponsiveness is within your control :) @TarikGul is the request timeout configurable per chance? |
@Ljzn Okay so first, I highly suggest running your own archive node. That way everything is under your control and easily monitor-able. Sidecar was never intended to be used heavily against public nodes.
Yes, this is configurable. I can add it as an ENV var. It gets attached to |
Thanks! |
Hello,
So it doesn't seem that there is a timeout issue or a connectivity on our components. Like @Ljzn, restarting the substrate-api make the query work again. I'm running sidecar v13.1.0 and node v0.9.3.0 Any ideas ? |
Hmm, yea this is an interesting issue becuase it's hard to reproduce. That being said few things to always potentially mitigate these issue:
Questions:
Also this is very odd as well, do you have any logs you can attach for these errors so we can check some patterns and try to load test on our end> |
Also what version of node.js are you running? |
Hello, But I kept some logs from the last time where we encoutered this issue :
At the same time, here's the output on the SAS service :
I can confirm again that it took less than 1second to have this error message. All of our nodes are connected to polkadot mainnet. node.js version used is : v16.18.1 (LTS) |
Hey @cdiarra-ledger Sorry this got lost in the queue. Are you still experiencing this issue? |
Due to inactivity I am closing the following issue. Feel free to reopen or open a new issue if you are still facing this problem |
Hi! |
This is interesting because we do not do any explicit caching ourselves for anything other then the |
Description
Sometimes the
/blocks/:height
api always return this message:Steps to Reproduce
Run substrate-api-sidecar connecting to a Kusama ws endpoint.
Expected vs. Actual Behavior
expected: Get block by height success.
actual: always return same error message for specific block.
The text was updated successfully, but these errors were encountered: