0

I have a Django Rest framework app in Heroku. The model objects and users I create from the admin panel automatically get removed after some time. I am using the django's dbSqlite3 as my database.

Why my data is not being stored in Heroku?? Is there any way to store my data permanently in Heroku?

Deepu
  • 31
  • 1
  • 5
  • 1
    You can't use SQLite on Heroku. https://devcenter.heroku.com/articles/sqlite3 "SQLite runs in memory, and backs up its data store in files on disk. While this strategy works well for development, Heroku’s Cedar stack has an ephemeral filesystem. You can write to it, and you can read from it, but the contents will be cleared periodically. If you were to use SQLite on Heroku, you would lose your entire database at least once every 24 hours." – ceejayoz Apr 27 '21 at 22:31
  • 1
    To store data permanently, use one of their database addons. The main one is https://www.heroku.com/postgres – ceejayoz Apr 27 '21 at 22:32
  • 1
    Does this answer your question? [Can I use a file based database on Heroku?](https://stackoverflow.com/questions/50421061/can-i-use-a-file-based-database-on-heroku) – ChrisGPT was on strike Apr 28 '21 at 01:34
  • @ceejayoz I get it now. Thanks – Deepu Apr 28 '21 at 03:13

0 Answers0