jazzband / dj-database-url

Use Database URLs in your Django Application.
https://pypi.org/project/dj-database-url/
BSD 3-Clause "New" or "Revised" License
1.49k stars 205 forks source link

Deploying to Heroku with pgbouncer #139

Closed yovelcohen closed 2 years ago

yovelcohen commented 4 years ago

Hi, I'm deploying a Django app to Heroku using the config function, so far it worked well. now I'm trying to scale a bit, so I added pgbouncer to the app's Procfile.

web: daphne rivendell.asgi:application --port $PORT --bind 0.0.0.0 -v2
worker: python manage.py runworker channel_layer -v2

but this crashes the server with the error:

django.db.utils.OperationalError: server does not support SSL, but SSL was required

My settings: DATABASES = {'default': dj_database_url.config(conn_max_age=600, ssl_require=True)}

mattseymour commented 2 years ago

I think this will be an issue with configuration, seeing as its now an old issue I am going to close. If anyone would like to add to this issue please do.