mirror of
https://github.com/chatmail/core.git
synced 2026-05-09 01:46:30 +03:00
fix: set soft_heap_limit on SQLite database
This should prevent unlimited growth of memory usage by SQLite for is page cache.
This commit is contained in:
@@ -686,6 +686,7 @@ fn new_connection(path: &Path, passphrase: &str) -> Result<Connection> {
|
|||||||
PRAGMA secure_delete=on;
|
PRAGMA secure_delete=on;
|
||||||
PRAGMA busy_timeout = 0; -- fail immediately
|
PRAGMA busy_timeout = 0; -- fail immediately
|
||||||
PRAGMA temp_store=memory; -- Avoid SQLITE_IOERR_GETTEMPPATH errors on Android
|
PRAGMA temp_store=memory; -- Avoid SQLITE_IOERR_GETTEMPPATH errors on Android
|
||||||
|
PRAGMA soft_heap_limit = 8388608; -- 8 MiB limit, same as set in Android SQLiteDatabase.
|
||||||
PRAGMA foreign_keys=on;
|
PRAGMA foreign_keys=on;
|
||||||
",
|
",
|
||||||
)?;
|
)?;
|
||||||
|
|||||||
Reference in New Issue
Block a user