托管在 Heroku 上的 SQLite 数据库自动重置 [英] SQLite database hosted on Heroku getting automatically reset

查看:35
本文介绍了托管在 Heroku 上的 SQLite 数据库自动重置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Heroku 上托管了一个非常简单的 Facebook 应用程序,它使用 PHP 作为后端,使用 SQLite 进行存储.出于某种奇怪的原因,SQLite 数据库被随机重置为我推送的最后一个版本.有人能帮我理解这背后的原因吗?

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 有一个 临时文件系统,每次 dyno 重新启动时都会丢失任何更改,经常发生一>.您应该将 SQL lite 文件存储在 amazon 上或使用 Heroku 数据库.

Heroku has an ephemeral file system that loses any changes each time the dyno restarts, which happens frequently. You should store SQL lite files on amazon or use an Heroku database.

这篇关于托管在 Heroku 上的 SQLite 数据库自动重置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆