Accessing cockroachcloud db from python app running in Heroku

102 views Asked by At

I just updated my python app running in heroku to point cockroachdb cloud DB. I am using the psycopg2 python library. Here is the exception I am running into:

2021-06-16T13:07:40.857022+00:00 app[web.1]: Oops! An exception has occured: FATAL:  CodeProxyRefusedConnection: Connection attempt throttled
2021-06-16T13:07:40.857074+00:00 app[web.1]: 
2021-06-16T13:07:40.857077+00:00 app[web.1]: Exception TYPE: <class 'psycopg2.OperationalError'>
2021-06-16T13:07:40.857078+00:00 app[web.1]: I am unable to connect to the database
2021-06-16T13:07:40.860470+00:00 app[web.1]: [2021-06-16 13:07:40 +0000] [7] [ERROR] Exception in worker process
2021-06-16T13:07:40.860471+00:00 app[web.1]: Traceback (most recent call last):

I run the same application on gunicorn/flask and it runs fine.

Any ideas on what could be the issue with running this app on heroku?

Here is the app that I am trying to deploy to Heroku: https://github.com/saqib-ali/hivemined

It is currently deployed to Digital Ocean App Platform, and connects to CockroachCloud without any issues.

0

There are 0 answers