刚开始收到AIR SQLite错误3182磁盘I / O错误

前端之家收集整理的这篇文章主要介绍了刚开始收到AIR SQLite错误3182磁盘I / O错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我们的软件的新测试版有一些变化,但不是我们的数据库层.

我们刚刚开始在服务器日志中报告错误3128.它似乎一旦发生,只要应用程序打开就会发生.代码中最明显的部分是我们每秒通过sqlite记录数据的位置.仅在本月,我们就在服务器上生成了47k错误.

3128     Disk I/O error occurred.   Indicates that an operation could not be completed because of a disk I/O error. This can happen if the runtime is attempting to delete a temporary file and another program (such as a virus protection application) is holding a lock on the file. This can also happen if the runtime is attempting to write data to a file and the data can't be written.

我不知道是什么原因造成了这个错误.也许是一个反病毒程序?也许我们的应用程序变得困惑并且彼此之间写入数据?我们正在使用异步连接.

它造成了很多问题,我们不知所措.它发生在我们的旧版本中,但可能在一个月内完成100次而不是47,000次.无论哪种方式,我都想让它发生“0”次.

解决方法

可能的解决方案: Exception Message: Some kind of disk I/O error occurred

简介:数据库可能没有问题,但在打开数据库后创建(或删除)临时文件时出现问题. AIR可能具有数据库的权限,但不能创建或删除目录中的文件.

One answer that has worked for me is to use the PRAGMA statement to set the journal_mode value to something other than DELETE. You do this by issuing a PRAGMA statement in the same way you would issue a query statement.

PRAGMA journal_mode = OFF

不幸的是,如果在设置OFF日记模式时应用程序在事务中间崩溃,那么数据库文件很可能会损坏.

1 http://www.sqlite.org/pragma.html#pragma_journal_mode

猜你在找的Sqlite相关文章