aboutsummaryrefslogtreecommitdiff
path: root/crates/tor-dirmgr/src/storage/sqlite.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tor-dirmgr/src/storage/sqlite.rs')
-rw-r--r--crates/tor-dirmgr/src/storage/sqlite.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/tor-dirmgr/src/storage/sqlite.rs b/crates/tor-dirmgr/src/storage/sqlite.rs
index 343be00a7..da8768c3e 100644
--- a/crates/tor-dirmgr/src/storage/sqlite.rs
+++ b/crates/tor-dirmgr/src/storage/sqlite.rs
@@ -106,6 +106,8 @@ impl SqliteStore {
OpenFlags::SQLITE_OPEN_READ_WRITE | OpenFlags::SQLITE_OPEN_CREATE
};
let conn = rusqlite::Connection::open_with_flags(&sqlpath, flags)?;
+ conn.execute_batch("PRAGMA mmap_size=268435456;")?;
+ conn.execute_batch("PRAGMA hard_heap_limit=5000000;")?; // 5 MB
let mut store = SqliteStore::from_conn(conn, blob_dir)?;
store.sql_path = Some(sqlpath);
store.lockfile = Some(lockfile);