Electrs crashes when trying to get balance of an address

Hello. I have the following issue:

When I open an address page in the Mempool app (eg http://{node_ip}:3006/address/{some_address}), I see a error:

Error loading address data.
*(failed to get block 00000000000000000012206336bbb49aca889479cae2877399756ad5798d4ffb)*

At the same time in the logs of electrs (sudo docker-compose logs -f electrs) I see the following, and then the container crashes:

electrs              | [2022-03-08T13:00:53.451Z INFO  electrs::electrum] your wallet uses less efficient method of querying electrs, consider contacting the developer of your wallet. Reason: blockchain.scripthash.get_balance called for unsubscribed scripthash: 43f626c7e6c22741e3160900776ba65f2526956c54779d193267fde55624adaf
electrs              | [2022-03-08T13:00:53.624Z WARN  electrs::thread] p2p_send thread failed: p2p failed to send
electrs              | [2022-03-08T13:00:53.624Z WARN  electrs::thread] because: Connection reset by peer (os error 104)
electrs              | [2022-03-08T13:00:53.624Z WARN  electrs::electrum] RPC blockchain.scripthash.get_balance failed: failed to get block 00000000000000000012206336bbb49aca889479cae2877399756ad5798d4ffb: receiving on an empty and disconnected channel
electrs              | [2022-03-08T13:00:53.624Z INFO  electrs::db] closing DB at /data/db/bitcoin
electrs              | Error: electrs failed
electrs              | 
electrs              | Caused by:
electrs              |     0: sync failed
electrs              |     1: sending on a disconnected channel

My setup

I’m running Umbrel on a regular PC, not a Pi. The OS is Debian 11. Nothing else is installed there besides the Umbrel. I followed the installation instructions here, but made one modification:

The OS is installed on an SSD, and the /umbrel directory is also located on the SSD, but I made /umbrel/bitcoin a soft link to a directory located on an HDD because I don’t have enough space on the SSD.

Umbrel version: 0.4.15

Likely related as reported by me yesterday: Wallets stuck "synchronizing" - Electrs failed

Might be. But the initial error is different.

In my case “p2p_send thread failed: p2p failed to send because: Connection reset by peer (os error 104)”, and in your “thread ‘p2p_loop’ panicked at ‘invalid message: OversizedVectorAllocation”

Connect through local IP not Tor.
I have also Umbrel on a Debian PC not Pi. But in LAN I always use the IP not Tor.
Tor is a real bottleneck in communicating with your node.
If you want to access it from outside LAN use Tailscale VPN (already Umbrel app), works great.

I was testing with local IP. It used to fail with every address. Now it works 90% of the time with local IP, and with Tor I think it’s less stable, but not sure.

I think it would help in cases like this if this proposal was added: https://github.com/getumbrel/umbrel/issues/285

No, a simple UI will not help to fix the disconnecting issue.
I think you have other problems that cause that electrs failure: memory full, swap full, slow disk, disk error, blocks error…