subquery / subql

SubQuery is an Open, Flexible, Fast and Universal data indexing framework for web3. Our mission is to help developers create the decentralised products of the future.
https://subquery.network
GNU General Public License v3.0
18.94k stars 328 forks source link

Indexer crashing on multiple websocket endpoints #2330

Open bz888 opened 7 months ago

bz888 commented 7 months ago

Prerequisites

Description

When using multiple websocket endpoints, if one of the socket is closed or throws an error, the indexer would crash.

Details

To reproduce, use two endpoints, one does not connect and one that does. When running it, it should throw a connection error.

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "Connection attempt timed out after 10009 ms".] {
  code: 'ERR_UNHANDLED_REJECTION'
}

Steps to Reproduce

This can be replicated with any subquery project, just need to find a non-connecting endpoint and a connecting on (websocket) Expected behavior: [What you expected to happen] Indexer should not crash even if one of the endpoints is broken Actual behavior: [What actually happened] Indexer crashes if one of the endpoints is broken

Any other information

Is there any other information you would like to add?

yoozo commented 2 months ago

image There are similar error messages, I think this is a configuration error.