Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix(db): reduce pool_recycle from 8h to 4h for better memory hygiene (#3171)

LearningCircuitfaec78083125
diff --git a/src/local_deep_research/database/auth_db.py b/src/local_deep_research/database/auth_db.py
index 26f8c15f5e..0a2764a131 100644
--- a/src/local_deep_research/database/auth_db.py
+++ b/src/local_deep_research/database/auth_db.py
@@ -78,7 +78,7 @@ def _get_auth_engine() -> Engine:
pool_size=5,
max_overflow=10,
pool_pre_ping=True, # Verify connections before use
- pool_recycle=28800, # Recycle connections after 8 h to bound SQLCipher memory/state accumulation
+ pool_recycle=14400, # Recycle connections after 4 h to bound SQLCipher memory/state accumulation
echo=False,
)
_auth_engine_path = auth_db_path
diff --git a/src/local_deep_research/database/encrypted_db.py b/src/local_deep_research/database/encrypted_db.py
index abc35ed004..ce3b7fe659 100644
--- a/src/local_deep_research/database/encrypted_db.py
+++ b/src/local_deep_research/database/encrypted_db.py
@@ -67,7 +67,7 @@ class DatabaseManager:
"pool_size": 10,
"max_overflow": 30, # Increase overflow so we don't run out of connections
"pool_pre_ping": True, # Validate connections before use (prevents stale connections)
- "pool_recycle": 28800, # Recycle connections after 8 h to bound SQLCipher memory/state accumulation
+ "pool_recycle": 14400, # Recycle connections after 4 h to bound SQLCipher memory/state accumulation
}
def _is_valid_encryption_key(self, password: str) -> bool: