question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`prisma migrate dev` fails repeatedly for PlanetScale

See original GitHub issue

Bug description

I’m attempting to migrate my database and continuously receiving the same error message using prisma@3.13.0:

Error: held locks released: vttablet: rpc error: code = Aborted desc = transaction 1651614596363662552: ended at 2022-05-03 22:38:12.305 UTC (exceeded timeout: 20s) (CallerID: planetscale-admin)
   0: migration_core::state::ApplyMigrations
             at migration-engine/core/src/state.rs:185

How to reproduce

Expected behavior

The migration should succeed.

Prisma information

Happy to provide this privately

Environment & setup

  • OS: Mac OS Monterey 12.0
  • Database: PlanetScale (MySQL)
  • Node.js version: 14.17.0

Prisma Version

prisma                  : 3.13.0
@prisma/client          : 3.13.0
Current platform        : darwin
Query Engine (Node-API) : libquery-engine efdf9b1183dddfd4258cd181a72125755215ab7b (at ../../../node_modules/.pnpm/@prisma+engines@3.13.0-17.efdf9b1183dddfd4258cd181a72125755215ab7b/node_modules/@prisma/engines/libquery_engine-darwin.dylib.node)
Migration Engine        : migration-engine-cli efdf9b1183dddfd4258cd181a72125755215ab7b (at ../../../node_modules/.pnpm/@prisma+engines@3.13.0-17.efdf9b1183dddfd4258cd181a72125755215ab7b/node_modules/@prisma/engines/migration-engine-darwin)
Introspection Engine    : introspection-core efdf9b1183dddfd4258cd181a72125755215ab7b (at ../../../node_modules/.pnpm/@prisma+engines@3.13.0-17.efdf9b1183dddfd4258cd181a72125755215ab7b/node_modules/@prisma/engines/introspection-engine-darwin)
Format Binary           : prisma-fmt efdf9b1183dddfd4258cd181a72125755215ab7b (at ../../../node_modules/.pnpm/@prisma+engines@3.13.0-17.efdf9b1183dddfd4258cd181a72125755215ab7b/node_modules/@prisma/engines/prisma-fmt-darwin)
Default Engines Hash    : efdf9b1183dddfd4258cd181a72125755215ab7b
Studio                  : 0.459.0
Preview Features        : referentialIntegrity

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
obibringcommented, May 12, 2022

Hi @janpio , I’m using the pscale CLI w/ a localhost hostname.

0reactions
janpiocommented, Jul 30, 2022

Can you help us to get to a reproduction somehow? What is the minimal code or project you need locally, and setup, to get this to happen? If we can reproduce this, we can actually try to understand what is happening and hopefully fix it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Migration troubleshooting in development - Prisma
This guide describes how to resolve issues with Prisma Migrate in a development environment, which often involves resetting your database.
Read more >
Automatic Prisma migrations - PlanetScale
We recommend prisma db push over prisma migrate dev for the following reasons: PlanetScale provides Online Schema Changes that are deployed ...
Read more >
Error when migrating models to database Prisma
According to nikolasburk you can also run prisma db push instead of the prisma migrate dev command, just run: npx prisma db push ......
Read more >
Using PlanetScale with Prisma in Next.js | Akhila Ariyachandra
We can use the Prisma Client as is, but you might run into the following error because the Prisma Client is initialized repeatedly...
Read more >
Serverless Databases With PlanetScale and Next.js
We, as software developers and engineers, we're having to consult them or being scared when we had to do a migration or we...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found