I
I
Inoyatullo2021-06-16 15:53:46
Python
Inoyatullo, 2021-06-16 15:53:46

ClearDB not working after restarting Heroku. What to do?

I am using ClearDB for data storage. But when Heroku sleeps, ClearDB crashes. lost connection error.

Here are the lines of code to connect:

from playhouse.db_url import connect
data =“*****”
db = connect(os.environ.get(data) or data)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Papa, 2021-06-16
Stifflera @PapaStifflera

Does not fall, but breaks an inactive connection. And this is normal behavior.
Solved by handling the error and then reconnecting.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question