hasura / hasura/graphql-engine
Monitoring: incorrect max connection pool size shown for read replicas
- Dominant language
- TypeScript
- Stars
- 32.1k
- Forks
- 3k
- PR merge metrics
- PR metrics pending
Description
### Version Information
Server Version: 2.11.2
### Environment
Cloud
### What is the current behavior?
Monitoring tab shows read replica max connection pool to be 20. This is incorrect per the configuration.
Interestingly this problem only occurred when a second read replica was added.
Unsure at this stage if this is a UI issue, a monitoring issue, or an issue with pooling logic.
### What is the expected behavior?
Given the following configuration, we expect read replica max connection pool to be 10 (5 configured max * 2 workers)
```yaml
- name: pg_chinook
kind: postgres
configuration:
connection_info:
database_url:
from_env: PG_CHINOOK_DATABASE_URL
isolation_level: read-committed
pool_settings:
connection_lifetime: 600
max_connections: 5
use_prepared_statements: false
read_replicas:
- database_url:
from_env: PG_CHINOOK_READONLY_1_DATABASE_URL
isolation_level: read-committed
pool_settings:
connection_lifetime: 600
max_connections: 5
use_prepared_statements: false
- database_url:
from_env: PG_CHINOOK_READONLY_2_DATABASE_URL
isolation_level: read-committed
pool_settings:
connection_lifetime: 600
max_connections: 5
use_prepared_statements: false
tables: "!include pg_chinook/tables/tables.yaml"
```
### Screenshots or Screencast
Correct pool size for main db

Incorrect pool size for read replica 1

Incorrect pool size for read replica 2

Contributor guide
Assessment
This issue has not been assessed yet.