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.

ETXTBSY error when an instance of prisma2 is already running

See original GitHub issue

Hi. I am trying to run studio against microservices with its own database (different schema.prisma files) and I get ETXTBSY error when doing so.

Steps to reproduce:

  1. CD to the first microservice. Run prisma2 studio to open up the studio for the first microservice. Everything works fine here.

  2. Keep the first instance of studio running, CD to the second microservice and run prisma2 studio or prisma2 generate. You get this error:

Error: ETXTBSY: text file is busy, open '/home/vignesh/.nvm/versions/node/v13.0.1/lib/node_modules/prisma2/query-engine-debian-openssl-1.1.x'
  1. Go back to the first microservice, stop the first instance of prisma2 studio and then run the commands in the second microservice, and then it works.

So, at max it is now possible to have only one instance of studio running at this time for me if prisma2 is installed globally as I see. So, when I have microservices with its own databases, not sure how to get multiple instances of studio running to connect to each of them.

STEPS I DID FOR WORKING AROUND THIS PROBLEM:

  1. Uninstall the global installation of prisma2

  2. Install it as a dev dependency locally specific to each microservice with npm install prisma2 --save-dev

  3. Then run studio in each microservice with npx prisma2 studio --port=5555 and npx prisma2 studio --port=5556 and then, it works without any issues.

So, I guess the problem is one binary being used for all instances of studio.

But then, still you have the problem that in every microservice, you need to stop the specific instance of studio to run prisma2 generate against it since it gets locked with itself.

Running Ubuntu 19.10:

Linux vignesh-predator 5.3.0-24-generic #26-Ubuntu SMP Thu Nov 14 01:33:18 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Tried this in prisma2 alpha as well as preview-019. Version:

prisma2@2.0.0-alpha.475, binary version: 8d3279825dadef204b1606d25b3c02db0ca33c91

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:25 (22 by maintainers)

github_iconTop GitHub Comments

5reactions
tvvigneshcommented, Jan 20, 2020

Adding a gif here to show the error for the repo https://github.com/vignesh-test-org/prisma-db-etxbsy

Peek 2020-01-20 22-30

2reactions
timsuchanekcommented, Jan 30, 2020

Thanks a lot for reporting 🙏 This issue is fixed in the latest alpha version of prisma2. You can try it out with npm i -g prisma2@alpha.

In case it’s not fixed for you - please let us know and we’ll reopen this issue!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error message reference - Prisma
Prisma Client throws a PrismaClientKnownRequestError exception if the query engine returns a known error related to the request - for example, a unique ......
Read more >
Prisma Issue of managing instances of Prisma Client actively ...
I was wondering is there any way to clear the duplicated instances that already actively running? I found a lot of INFO only...
Read more >
An introduction to Prisma 2 - LogRocket Blog
Prisma 2 is currently ready for production, and isprisma2ready now ... the console.error , and whether an error happens or not after running...
Read more >
Getting Started with the Prisma Framework (formerly Prisma 2 ...
iOS runs the simulator even if it's not already running. It should look like this: Programming Quotes — React Native Init
Read more >
How to Build a Fullstack App with Next.js, Prisma, and ... - Vercel
tsx are currently returning hardcoded data. In this step, you'll adjust the implementation to return data from the database using Prisma Client. Open...
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