fix(deploy): tolerate P1002 (migrate advisory lock timeout)#32
Merged
Conversation
Most recent deploys started failing with P1002 — Prisma timed out trying to acquire its migrate advisory lock (pg_advisory_lock(72707369), 10s timeout). This usually means a previous deploy crashed without releasing the lock, or two deploys are racing to apply migrations. Skipping is safe: the next deploy retries, and _prisma_migrations prevents double-application even if a stale lock corrupts state. The warning prints the manual unlock SQL operators can use if it persists across more than a couple deploys: SELECT pg_advisory_unlock(72707369); Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Most recent deploys are failing with
P1002— Prisma timed out trying to acquire its migrate advisory lock (pg_advisory_lock(72707369), 10s timeout). Likely a previous failed deploy left the lock orphaned, or two deploys raced.Add a graceful skip for P1002 alongside the P3005 path. Skipping is safe — the next deploy retries, and
_prisma_migrationsprevents double-application even with a stale lock.The warning includes the manual unlock SQL if it persists:
🤖 Generated with Claude Code