Heroku上托管的SQLite数据库会自动重置 [英] SQLite database hosted on Heroku getting automatically reset
本文介绍了Heroku上托管的SQLite数据库会自动重置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Heroku上托管了一个非常简单的Facebook应用程序,它使用PHP作为后端,SQLite用于存储。出于某种奇怪的原因,SQLite数据库会随机重置为我推送的最后一个版本。有人可以帮我理解这个背后的原因吗?解决方案
Heroku有短暂的文件系统。在每次请求时,都会克隆和销毁新的环境。您应该将SQL Lite文件存储在Amazon上或使用Heroku数据库。
I've a very simple Facebook application hosted on Heroku which uses PHP for back-end and SQLite for storage. For some weird reason, the SQLite database gets randomly reset to the last version I pushed. Can someone help me understand the reason behind this?
解决方案
Heroku has ephemeral file system. At each request a new environment is cloned and destroyed. You should store SQL lite files on amazon or use an Heroku database.
这篇关于Heroku上托管的SQLite数据库会自动重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文