Skip to content

fix: recover DB pool after Railway disconnects - #93

Merged
chasehuh merged 1 commit into
mainfrom
fix/db-schema-ready-reset
Aug 9, 2026
Merged

fix: recover DB pool after Railway disconnects#93
chasehuh merged 1 commit into
mainfrom
fix/db-schema-ready-reset

Conversation

@chasehuh

@chasehuh chasehuh commented Aug 9, 2026

Copy link
Copy Markdown
Member

Summary

  • ERROR 2206690639 was a Next.js digest for Connection terminated unexpectedly after the Railway Postgres outage.
  • Warm Vercel isolates kept a rejected ensureSchema promise, so every request failed even after the DB was healthy again.
  • Clear the sticky promise, recreate the pool on transient disconnects, and retry once. Also tighten serverless pool settings for Railway TCP proxy.

Test plan

  • Production redeploy already flushed warm isolates (www.agentnote.dev)
  • Hard refresh agentnote.dev while signed in — notes list / note open should work
  • Confirm Vercel runtime logs no longer show digest 2206690639 after merge deploy

Made with Cursor

Warm serverless isolates kept a rejected ensureSchema promise after
Railway dropped Postgres, so every request resurfaced the same digest
even after the database came back. Clear the sticky promise, recreate
the pool, and retry once on transient disconnects.

Co-authored-by: Cursor <cursoragent@cursor.com>
@vercel

vercel Bot commented Aug 9, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
memo Ready Ready Preview Aug 9, 2026 4:28am

Request Review

@chasehuh
chasehuh merged commit aff1f37 into main Aug 9, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant