Skip to content
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

getblockstats RPC call causes issues in slow device mode #286

Closed
pointbiz opened this issue Feb 15, 2021 · 3 comments
Closed

getblockstats RPC call causes issues in slow device mode #286

pointbiz opened this issue Feb 15, 2021 · 3 comments

Comments

@pointbiz
Copy link
Contributor

I suggest when in slow device mode that
getblockstats is not called more than once at a time. On my slow Bitseed v3 the explorer will crash if
getblockstats is called too many times rapidly.
I have my timeouts set to 180 seconds in the explorer config.

/
Loading the default page causes the explorer to crash. However, on a slow device we don't want that behavior because there's many other useful things to do with the explorer.

/block-stats
The page will load but the automatic calling of getblockstats for 144 blocks will crash the explorer. I suggest this page is hidden when in slow device mode.

/blocks
The automatic calling of getblockstats for the latest 10 blocks causes the explorer to crash because bitcoind gives error responses or timeouts. I suggest in slow device mode that only one block is automatically called on this URL.

@pointbiz
Copy link
Contributor Author

I locally solved this issue by modifying the app/config.js

I changed
site.homepage.recentBlocksCount = 1
I changed
site.browseBlocksPageSize = 1

I propose two new environment variables so this can be configured for slow devices.

BTCEXP_CONFIG_HOME_RECENT_BLOCK_COUNT
BTCEXP_CONFIG_BLOCKS_PAGE_SIZE

The defaults would stay the same and be used if the environment variables are not defined.

I could prepare a pull request if this approach is ok with you.

@janoside
Copy link
Owner

I agree with the overall idea here and the issue you're raising. Another idea that comes to mind is to clamp down the "rpc concurrency" value when in slow device mode. I'll consider the env variables you recommended too.

This isn't the top priority at the moment, but will try to address for the next release because I know lots of users on on "slow" devices.

janoside added a commit that referenced this issue Mar 31, 2021
Thanks @pointbiz. Just tweaked from your PR.
@pointbiz
Copy link
Contributor Author

pointbiz commented Apr 1, 2021

V3 fixes this issue. So, I'm closing the issue.

@pointbiz pointbiz closed this as completed Apr 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants