elixir-omg icon indicating copy to clipboard operation
elixir-omg copied to clipboard

DBConnection.ConnectionError: tcp connect (127.0.0.1:5432): connection refused - :econnrefused

Open sentry-io[bot] opened this issue 4 years ago • 4 comments

Sentry Issue: ELIXIR-OMG-6J

DBConnection.ConnectionError: tcp connect (127.0.0.1:5432): connection refused - :econnrefused

(DBConnection.ConnectionError) tcp connect (127.0.0.1:5432): connection refused - :econnrefused

sentry-io[bot] avatar Sep 14 '20 03:09 sentry-io[bot]

Some of my investigation: https://sentry.io/organizations/omisego/issues/1787235126/activity/?project=1477673&query=is%3Aunresolved

I am guessing when we restart watcher-info it will try to ask for Postgres while it is not ready yet (I assume Postgres got restart as well). Not sure what is the solution to this. We can ignore the sentry error or try to make our Genserver smarter (?) to detect Postgres is not ready in init?

boolafish avatar Sep 14 '20 03:09 boolafish

Another might be related Sentry issue: https://sentry.io/organizations/omisego/issues/1824732112/activity/?project=1477673&query=is%3Aunresolved

boolafish avatar Sep 14 '20 03:09 boolafish

Confirmed related to deployment (did one new deployment on stress for 1.0.4-pre.2 and the report immediately shows)

boolafish avatar Sep 14 '20 08:09 boolafish

From @arthurk , it can be caused by cloudsql-proxy gets restarted. (Some background, the stress deployment actually did not restart the pod for watcher-info nor the Postgres for the watcher-info as the image of stress was hardcoded.)

https://omgnetworkhq.slack.com/archives/CMX790Q5V/p1600073457072700?thread_ts=1600073144.072000&cid=CMX790Q5V

boolafish avatar Sep 14 '20 09:09 boolafish