SSL Connection error to Postgres DBs
mertzamir
PROOP

2 months ago

Recently we've been getting lots of connections issues to our postgres databases. Most of these errors have the below message:

```
psycopg2.OperationalError: SSL connection has been closed unexpectedly
```

The database in the matter here is only accessible by a single microservice that's a FastAPI service with 4 workers, so there should be very reasonably low connections to this database. We still couldn't debug these flaky SSL connection errors, if someone from the Railway side can help checking if there's something wrong with the postgre dbs we use in the development environment. especially the data-postgres-dev , rest-postgres-dev, ai-api-postgres-dev .. that'd be really helpful..

Solved$40 Bounty

3 Replies

Railway
BOT

2 months ago


brody
EMPLOYEE

2 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody about 2 months ago


fra
HOBBY

2 months ago

maybe I'm gonna say something stupid, but given the SSL cert is a self signed cert, and given you are using the db using the internal network (I suppose), should the SSL be disabled?


irazvan2745
PRO

2 months ago

if youre using internal network ssl isnt needed. Only use it when its a public network


Status changed to Solved mertzamir about 2 months ago


Loading...