fix: postgres/neon connection settings and search index dedupe

- Reduce db_pool_recycle from 3600s to 180s for Neon scale-to-zero
- Add connect_args for Neon serverless (statement cache, timeouts, app name)
- Dedupe observation permalinks in search indexing to avoid unique constraint violations
- Add tests for duplicate observation permalink handling

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: phernandez <paul@basicmachines.co>
This commit is contained in:
phernandez
2025-11-29 11:24:08 -06:00
parent 830775276d
commit b5d4fb559c
4 changed files with 205 additions and 4 deletions
+2 -2
View File
@@ -112,8 +112,8 @@ class BasicMemoryConfig(BaseSettings):
gt=0,
)
db_pool_recycle: int = Field(
default=3600,
description="Recycle connections after N seconds to prevent stale connections (Postgres only)",
default=180,
description="Recycle connections after N seconds to prevent stale connections. Default 180s works well with Neon's ~5 minute scale-to-zero (Postgres only)",
gt=0,
)