[英]openDatabase error in mac safari
When try to save/load from websqlite using "window.openDatabase(...)" in mac safari, sometimes fails with the following exception: 当尝试在Mac Safari中使用“ window.openDatabase(...)”从websqlite保存/加载时,有时会失败,并带有以下异常:
sqlite cannot open database file
Then the websql can no-longer use unless reload the page. 然后,除非重新加载页面,否则无法再使用websql。
Does anybody know how it can be solved? 有人知道如何解决吗? THX.
谢谢。
ps It`s on desktop mac safari, not ios safari or the issue "less or more data stored more than 5MB question". ps是在台式机Mac Safari上,而不是ios Safari上,或者出现“存储的数据少于或更多,超过5MB的问题”。
The problem maybe that Safari doesn't seem to be able to garbage collect openDatabase connections, are you making a lot of openDatabase calls? 问题可能是Safari似乎无法垃圾收集openDatabase连接,您是否进行了许多openDatabase调用? perhaps one per row?
也许每排一个? to avoid this make sure you cache and reuse your database handles.
为了避免这种情况,请确保您缓存并重用数据库句柄。
For further information, see this task which has a good discussion. 有关更多信息,请参见对此任务进行了很好的讨论。
https://github.com/pouchdb/pouchdb/issues/1068 https://github.com/pouchdb/pouchdb/issues/1068
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.