-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
django.db.utils.OperationalError: server does not support SSL, but SSL was required #118
Comments
I am also getting this issue, would love to know if there is a fix! |
same here EDIT: After some more research I found a solution that works for me. I needed to remove the automatically added "sslmode: required" from the DB-settings which was possible by adding
Solution was found here: https://github.com/kennethreitz/dj-database-url/issues/107 |
For reference, this is due to that when PgBouncer is running locally on the dyno, it doesn't have TLS enabled for local connections (i.e. Closing this issue out as the above documents the solution nicely. |
Is this fixed though, or does everyone need to implement the workaround by LtKvasir? |
@lpellis There is nothing to fix – the buildpack runs PgBouncer locally without Many PG drivers default to We could call this out in the README more explicitly that the buildpack runs PgBouncer with |
It would be nice then to maybe mention this solution in the docs, as it is currently the steps outlined in https://devcenter.heroku.com/articles/python-concurrency-and-database-connections will not work if you use dj-database-url |
Sure, thanks for the feedback. It's tricky to cover all possible combinations of use cases, especially when community buildpacks are involved. |
Thanks @LtKvasir I was getting this error only when I tried running
|
I had the same error, and just deleted PGSSLMODE. |
This is a proper answer. |
I'm having issues getting it to work on python (django)
heroku buildpacks:add https://github.com/heroku/heroku-buildpack-pgbouncer --index 1
and my procfile
web: bin/start-pgbouncer gunicorn config.wsgi
I also tried
web: bin/start-pgbouncer-stunnel gunicorn config.wsgi
but same issue, setting
PGSSLMODE=disable
doesnt seem to change anything.fwiw it seemed to detect it correctly
remote: -----> Deleting 4 files matching .slugignore patterns. remote: -----> pgbouncer app detected remote: Using pgbouncer version: 1.8.1-heroku remote: -----> Fetching and vendoring pgbouncer into slug remote: -----> Moving the configuration generation script into app/bin remote: -----> Moving the start-pgbouncer script into app/bin remote: -----> Moving the (legacy) start-pgbouncer-stunnel script into app/bin remote: -----> Moving the use-pgbouncer script into app/bin remote: -----> pgbouncer done remote: -----> Python app detected remote: Using supported version of Python 3.6 (python-3.6.6)
Any ideas what is the issue here?
The text was updated successfully, but these errors were encountered: