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
19.06k stars 328 forks source link

chore: Update PostgreSQL connection pool handling #2524

Closed mpastecki closed 1 month ago

mpastecki commented 1 month ago

Description

This adds a better handling of db pool connections that are explicitly used in the code to verify SSL settings and to setup the database schema-change listener. These two clients were sitting idle either doing nothing or listening for a rare event of a schema change.

In environments where idle tcp connections are killed eventually, these connections were killed and that caused the whole app was killed due to uncaught exception.

Fixes (#2520 )

Type of change

Please delete options that are not relevant.

Checklist