0
votes

I've written a simple Django Q&A forum app and deployed it on Heroku. The local version of the site works fine. However, the production version does not store the questions, answers etc. for more than a few hours.

I decided to stick with sqlite3 that comes with Django. I don't expect a lot of traffic to the site so I decided it would be worth it to keep the development database for now.

site: http://immense-plateau-35286.herokuapp.com

I've tried a few solutions from the DB setup page on Heroku, but have not had any success so far.

Any idea what this might be?

1

1 Answers

5
votes

Heroku's filesystem is ephemeral. Anything you write to it will be lost anytime your dyno restarts, which happens frequently. Since SQLite stores its data in a file on the filesystem it isn't a good choice on Heroku.

Instead, consider using one of the many client-server data stores that Heroku supports. Its PostgreSQL offering works reasonably well.