Skip to content

[PostgreSQL] Intermittent i/o timeout errors and request for better connection pool configuration & metrics #1107

@archib07

Description

@archib07

Hello!
We are experiencing intermittent i/o timeout errors on established connections to our external PostgreSQL instance. These failures affect core operations: DELETE, INSERT (add), and UPDATE, impacting the reliability of policy-reporter.
Error Logs
The logs show i/o timeout errors on an already established TCP connection during different operations:

1.7556721861647866e+09 error failed to remove previous policy report {"error": "read tcp 10.XXX.XXX.XXX:43690->10.XXX.XXX.XXX:5432: i/o timeout"}

1.7556721861648421e+09 error failed to add policy report {"name": "polr-ns-test", "error": "read tcp 10.XXX.XXX.XXX:43690->10.XXX.XXX.XXX:5432: i/o timeout"}

1.7557270106546857e+09 error failed to update policy report {"name": "110d8ed3-1159-11e8-9d6b-005056a934e4", "error": "read tcp 10.XXX.XXX.XXX:43690->10.XXX.XXX.XXX:5432: i/o timeout"}

We see that the application uses the Bun ORM, which has a built-in connection pool. However, it's unclear how to configure its parameters (like timeouts, pool size) through the Helm chart. Furthermore, we lack visibility into the database layer performance and error rates.

Environment Details:
Policy-Reporter Version: 3.1.3
Database: External PostgreSQL
Deployment Environment: Kubernetes (via Helm chart - 3.1.3)

We would like to request:

  1. Exposure of Bun's connection pool settings via Helm chart values.
  2. Integration of Bun's monitoring hooks to expose database-related metrics.

Metadata

Metadata

Assignees

No one assigned

    Labels

    CorePolicy Reporter Core ApplicationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions