Commit Graph

42 Commits

Author SHA1 Message Date
cthomas
28a66fa9d7 chore: remove stmt timeout debug logging (#9693) 2026-03-03 18:34:02 -08:00
Kian Jones
2f0294165c debug: log statement_timeout + connection pid on session checkout (#9472)
* debug: log statement_timeout + connection pid on every session checkout

Temporary instrumentation to diagnose why some PlanetScale connections
have statement_timeout=5s while others have 0 (disabled).

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* debug: log statement_timeout on every checkout, not just non-zero

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

* fix: rollback implicit transaction from debug query

The SELECT implicitly begins a transaction, causing "A transaction is
already begun" errors for code that calls session.begin() explicitly.

🤖 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

---------

Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:52:07 -08:00
Kian Jones
69fc934135 fix(core): handle transient database connection errors with retry logic (#9324)
Add retry mechanism for ConnectionError during asyncpg SSL handshake failures.
Implements exponential backoff (3 attempts) and returns 503 on exhaustion.

🐾 Generated with [Letta Code](https://letta.com)

Co-Authored-By: Letta <noreply@letta.com>

Issue-ID: 8caf1136-0200-11f1-8f4d-da7ad0900000
2026-02-24 10:52:06 -08:00
Kian Jones
68eb076135 Revert "fix: force statement_timeout=0 on all database connections" (#9226)
Revert "fix: force statement_timeout=0 on all database connections (#9184)"

This reverts commit 0d3d9ea76bae586520ae8f50badb203ffd441675.
2026-02-24 10:52:06 -08:00
Kian Jones
3b5251fbd6 fix: force statement_timeout=0 on all database connections (#9184)
Cloud SQL's connection pooler can return connections with stale
session settings from previous clients. If any client (Datadog,
monitoring tools, manual psql) sets statement_timeout, that setting
persists on the pooled connection.

This explicitly sets statement_timeout=0 via asyncpg's server_settings
on every connection, ensuring consistent behavior regardless of
connection pool state.

🤖 Generated with [Letta Code](https://letta.com)

Co-authored-by: Letta <noreply@letta.com>
2026-02-24 10:52:05 -08:00
cthomas
449e23a265 fix: ssl connection requried db error [LET-6720] (#8172)
fix: ssl connection requried db error
2026-01-12 10:57:48 -08:00
Sarah Wooders
b23722e4a1 fix: also cleanup on asyncio cancel (#6586) 2025-12-15 12:02:34 -08:00
cthomas
d0d47021e5 feat: expunge orm objects for garbage collection (#6270) 2025-11-24 19:10:11 -08:00
cthomas
9cb5156ac7 chore: sync 0.12.0 version (#3023)
Co-authored-by: Matthew Zhou <mattzh1314@gmail.com>
Co-authored-by: Kian Jones <11655409+kianjones9@users.noreply.github.com>
Co-authored-by: Sarah Wooders <sarahwooders@gmail.com>
2025-10-08 16:10:51 -07:00
Sarah Wooders
8fee5b4b93 fix: remove db locks (#4879) 2025-10-07 17:50:45 -07:00
Sarah Wooders
4df0a27eb0 chore: remove sync db (#4873) 2025-10-07 17:50:45 -07:00
Kian Jones
b8e9a80d93 merge this (#4759)
* wait I forgot to comit locally

* cp the entire core directory and then rm the .git subdir
2025-09-17 15:47:40 -07:00
Kian Jones
22f70ca07c chore: officially migrate to submodule (#4502)
* remove apps/core and apps/fern

* fix precommit

* add submodule updates in workflows

* submodule

* remove core tests

* update core revision

* Add submodules: true to all GitHub workflows

- Ensure all workflows can access git submodules
- Add submodules support to deployment, test, and CI workflows
- Fix YAML syntax issues in workflow files

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

Co-Authored-By: Claude <noreply@anthropic.com>

* remove core-lint

* upgrade core with latest main of oss

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-09 12:45:53 -07:00
Charles Packer
bd56635ba9 feat(desktop): allow specifying a remote letta server in the letta desktop (#3709) 2025-08-05 22:21:07 -07:00
cthomas
685134b004 feat: add db session task throttling (#3461) 2025-07-21 15:08:56 -07:00
cthomas
6fbd5bcdd0 feat: add connection release info to tracing (#3432) 2025-07-20 13:59:07 -07:00
Andy Li
1ccaae8960 chore: cleanup database detection 2025-07-18 17:12:56 -07:00
cthomas
fd835492d8 feat: LET-3090 add sqlalchemy debug info to traces (#3401) 2025-07-17 22:17:48 -07:00
Kian Jones
0cd8c830c9 feat(sqlite): CI Tests for Alembic and SQLite (#3358)
Co-authored-by: Matt Zhou <mattzh1314@gmail.com>
2025-07-17 18:04:13 -07:00
cthomas
ce2fdf3669 feat: don't expire on commit (#3384) 2025-07-17 13:50:10 -07:00
Andy Li
aabf645486 feat: db pool otel metric emission 2025-07-15 15:56:39 -07:00
cthomas
5d33b650eb feat: add traces for root causing sync db call regressions (#3201) 2025-07-07 13:39:59 -07:00
Andy Li
d2252f2953 feat: otel metrics and expanded collecting (#2647)
(passed tests in last run)
2025-06-05 17:20:14 -07:00
Matthew Zhou
3d8704395b feat: Store entire parsed file content in separate table (#2618) 2025-06-03 18:51:45 -07:00
cthomas
196e43c5ce fix: nullpool asyncpg timeout (#2556) 2025-05-30 14:01:59 -07:00
cthomas
f3cc094254 feat: disable session reuse after close (#2547) 2025-05-30 12:51:19 -07:00
cthomas
0232eef5b2 feat: add timeout to null pool (#2549) 2025-05-30 12:50:53 -07:00
Kian Jones
25403dcde8 fix(db): Disable Prepared Statements to Satisfy the Connection Pooler (#2449)
Co-authored-by: Kian Jones <kianjones@Kians-MacBook-Pro-2.local>
2025-05-27 15:29:12 -07:00
Kian Jones
c44c180ad2 Revert "feat: turn off prepared statements" (#2448) 2025-05-26 22:04:22 -07:00
cthomas
3ef7101922 feat: turn off prepared statements (#2444) 2025-05-26 20:56:57 -07:00
Matthew Zhou
031dffc86b fix: Patch db init bug (#2389) 2025-05-23 13:58:19 -07:00
Sarah Wooders
bca6d5f794 feat: support sqlite async for async DB engine (#2384) 2025-05-23 13:49:07 -07:00
cthomas
8d00e7fd14 feat: add low level db traces (#2343) 2025-05-22 23:35:10 -07:00
Sarah Wooders
9fad8487db feat(asyncify): migrate sources to async (#2332) 2025-05-22 19:39:44 -07:00
cthomas
6c1b189080 feat: add db tracing to otel (#2337) 2025-05-22 13:47:49 -07:00
Matthew Zhou
b555ded77a feat: Add flag to disable/enable pooling on app level (#2310) 2025-05-21 11:59:21 -07:00
Matthew Zhou
ec7c98f78c feat: Tune down pg pool size params and switch connection picking to LIFO (#2299) 2025-05-21 09:29:16 -07:00
Andy Li
3028403007 fix: asyncgp ssl param (#2147) 2025-05-13 10:40:10 -07:00
Andy Li
600ccb35e7 feat: async db client (#2076) 2025-05-12 17:15:14 -07:00
Matthew Zhou
b07bda4c19 feat: Add lazy initialization to db.py (#1716) 2025-04-15 12:01:46 -07:00
Charles Packer
8c57db89d4 fix: patch desktop database bug, ensure UTF-8 across python and app.ts (#1497) 2025-03-31 23:38:42 -07:00
Matthew Zhou
b5e09536ae feat: Serialize agent state simple fields and messages (#1012) 2025-02-18 11:01:10 -08:00