PhysicsUofRAUI / lifeLongLearning

https://lifelonglearning.rocks
MIT License
1 stars 0 forks source link

Database goes away after a few hours #5

Closed PhysicsUofRAUI closed 4 years ago

PhysicsUofRAUI commented 4 years ago

It is the MySQL has gone away error. I think my configuration file is not being loaded correctly because a few other things had to be written there which on my own machine did not have to be. For instance the database uri is supposed to be set by an environment variable but it currently is not being set that way.

PhysicsUofRAUI commented 4 years ago

seems to have been fixed by adding

try :
    # database stuff
except :
    db.session.rollback()

To every place that has database operations