openflagr / flagr-archived

[Archived] - Merged and move to https://github.com/openflagr/flagr
https://openflagr.github.io/flagr
Apache License 2.0
33 stars 7 forks source link

Cannot query all flags. write tcp write: connection reset by peer #37

Closed pixeldrew closed 2 years ago

pixeldrew commented 3 years ago

Expected Behavior

DB Connection Fails after a period of time

DB connection should reset or application should be marked as failed.

Current Behavior

Currently we have flagr deployed to kubernetes cluster and connected to an Azure hosted postgres installation, will occasionally have connection issues with this message being shown:

{message: "cannot query all flags. write tcp 192.168.8.189:45216->172.21.56.12:5432: write: connection reset by peer"}

Once the container is restarted the connection is restored.

Possible Solution

Health check doesn't take into consideration this error and shows green status. If this error is known during health check I could restart the service

Your Environment

github-actions[bot] commented 2 years ago

Stale issue message

pixeldrew commented 2 years ago

see https://github.com/go-gorm/gorm/issues/2081 and https://github.com/go-gorm/gorm/issues/2963