PostgreSQL connection error

Hi all, can anyone help me avoid this error - sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) SSL connection has been closed unexpectedly? I’m going crazy :frowning: I have already set SQLALCHEMY_ENGINE_OPTIONS = {
‘pool_pre_ping’: True,
‘pool_recycle’: 300
}. Mine is an app in Flask, gunicorn and PostgresSQL. Normal CRUD operations on users work correctly but when I make external calls to other APIs (which take a long time to process the response), when saving the result in the db it generates connection error.

Hi there,

Using a database in the same region combined with the internal database URL will help with this.

Regards,

Keith
Render Support, UTC+10 :australia:

What’s the actual issue going on here though?
I’m seeing the same issue for data pipelines and could update the pipeline to use the internal database URL, but that wouldn’t fix the reporting in Power BI that’s seeing the same error.

Hi Sam,

I just responded to the support ticket you opened. We’ll address your errors there.

Regards,

Matt

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.