SSL Connection error to Postgres DBs

mertzamir
PROOP

a month 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

a month ago


a month 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 1 month ago


fra
HOBBYTop 10% Contributor

a month 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

a month ago

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


Status changed to Solved mertzamir about 1 month ago


Loading...