D
D
DUDE2020-05-20 00:40:30
Python
DUDE, 2020-05-20 00:40:30

Why is the Sqlite base dropping on heroku?

In my project, I use the Sqlite database, which I throw directly on the github and do the deployment by linking the github account to the herok. So, about once a day, the number of people in the database is rolled back to the value that was at the last commit. Do I understand correctly that Heroku restarts the application once a day and all changes with local files are rolled back to the state of the last deploy?

If this is so, then why does the application have no information about restarting in the logs (if I'm not mistaken, it says about cycling in the console) from the word at all. The bot worked as it should. I don’t do anything supernatural with the database, I just write users there, or they pull out the necessary records from there.

PS Don't even ask why I load the database this way, it's just the way it should be.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Ruslan, 2020-05-20
@stympel

You can't use files on heroku because it uses a virtual file system that restarts at least once a day. They immediately warn about this in the description. On heroku, the base is provided even in the case of free access for training, although only 5Mb seems to be in the hobby-dev package. Other options for money are also possible. If you need to use the sqlite file, then you need to look for another hosting, heroku will not work.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question