我们的软件有一个新的测试版,进行了一些更改,但不是围绕我们的数据库层。
我们刚刚开始在服务器日志中报告错误 3128。似乎一旦发生,只要应用程序打开,它就会发生。代码中最明显的部分是我们通过 SQLite 每秒记录数据的部分。仅这个月我们的服务器就产生了 47,000 个错误。
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”次。
可能的解决方案:异常消息:发生某种磁盘 I/O 错误
摘要: 数据库可能没有问题,但在打开数据库后创建(或删除)临时文件时出现问题。 AIR 可能具有数据库的权限,但无权在目录中创建或删除文件。
对我有用的一个答案是使用PRAGMA
语句来设置journal_mode
对其他事物的价值DELETE
。您可以通过发出PRAGMA
语句的方式与发出查询语句的方式相同。
PRAGMA journal_mode = OFF
Unfortunately, if the application crashes in the middle of a transaction when the OFF journaling mode is set, then the database file will very likely go corrupt.1.
1 http://www.sqlite.org/pragma.html#pragma_journal_mode
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)