janoside / btc-rpc-explorer

Database-free, self-hosted Bitcoin explorer, via RPC to Bitcoin Core.
https://bitcoinexplorer.org
MIT License
1.52k stars 1.13k forks source link

Timeout on RPC API Address Call #411

Closed BTCfan86 closed 1 year ago

BTCfan86 commented 2 years ago

Hello, I think I’m having a timeout issue when I try to make API calls to the BTC RPC Explorer app using a script I wrote in Python. I’m running Umbrel on a Raspberry Pi4, and using the RPC Explorer app provided through Umbrel. When I send an API call for a summary of data pertaining to a specific bitcoin address (e.g. “localhost”/port/api/address/address, including an address at the end), python frequently gives me the following error message:

(‘Connection aborted.’, RemoteDisconnected(‘Remote end closed connection without response’)).

Also, when I try to access the API URL using my browser, the browser fails to load the page with the JSON data. It seems like the requests are timing out. On the other hand, I have no problems getting data for blocks or txids from the RPC API. I have also had a few times where the address call described above works fine, and the API returns the data I wanted. Is there a way to elongate the time-out period, or otherwise address this problem? Any help is much appreciated. Thanks!

BTCfan86 commented 2 years ago

Hi, just as an update, I noticed a related thread at https://github.com/janoside/btc-rpc-explorer/issues/372.

I have been able to successfully run the address API query on my local node, but the success rate is at best 50%,. Sometimes it works, sometimes you get RemoteDisconnected(‘Remote end closed connection without response’)). I don't know what is happening when the remote end closes the connection. Is there anything that I can do? Any timeout setting I can change etc.?

Is this in any way related to https://stackoverflow.com/a/48105794?

pointbiz commented 1 year ago

When you make an address API call it uses Electrumx. On a raspi that could be slow. Check Electrumx configuration timeouts as well.

janoside commented 1 year ago

Cleaning up old issues. If you're still having this problem using the latest code (3.4-beta or greater), feel free to reply.

BTCfan86 commented 1 year ago

Thanks for following up on this. My Umbrel node is showing version 3.3.0 as the latest version. Do you anticipate pushing the update for Umbrel nodes for version 3.4 soon?