Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

perf(cloud-storage): cap prod database pools at 10-50 connections per task (#9061)

Wolf Mermelstein38b88f15c1fb
diff --git a/services/document_storage_service/src/server.rs b/services/document_storage_service/src/server.rs
index 5e7e0f853d..96cc5bdd2a 100644
--- a/services/document_storage_service/src/server.rs
+++ b/services/document_storage_service/src/server.rs
@@ -228,8 +228,10 @@ pub async fn run() -> anyhow::Result<()> {
tracing::trace!("initialized config");
+ // Per task. Normally each task runs about one query at a time; a larger
+ // max only lets a slow database pile up more sessions.
let (min_connections, max_connections): (u32, u32) = match config.environment {
- Environment::Production => (50, 150),
+ Environment::Production => (10, 50),
Environment::Develop => (25, 100),
Environment::Local => (15, 50),
};