perf(db): default pool_pre_ping=false for SQLite
SQLite is a local file — a SELECT 1 per session checkout is pure overhead. Env var DECNET_DB_POOL_PRE_PING stays for anyone running on a network-mounted volume. MySQL backend keeps its current default.
This commit is contained in:
@@ -18,7 +18,9 @@ def get_async_engine(db_path: str) -> AsyncEngine:
|
||||
max_overflow = int(os.environ.get("DECNET_DB_MAX_OVERFLOW", "40"))
|
||||
|
||||
pool_recycle = int(os.environ.get("DECNET_DB_POOL_RECYCLE", "3600"))
|
||||
pool_pre_ping = os.environ.get("DECNET_DB_POOL_PRE_PING", "true").lower() == "true"
|
||||
# SQLite is a local file — dead-connection probes are pure overhead.
|
||||
# Env var stays for network-mounted setups that still want it.
|
||||
pool_pre_ping = os.environ.get("DECNET_DB_POOL_PRE_PING", "false").lower() == "true"
|
||||
|
||||
engine = create_async_engine(
|
||||
f"{prefix}{db_path}",
|
||||
|
||||
Reference in New Issue
Block a user