Prisma connection not closing in Playwright test runner
See original GitHub issueBug description
Hello, Prisma team, thanks for your amazing work.
We use Playwright for running e2e tests against our web applications at my company. We are already using Prisma on the backend and would like to use it also for seeding (and tearing down) the data that is required for running the tests (creating a test user, deleting a post after creating it, etc).
So far Prisma works well for this purpose, speeding up my workflow a lot. However, some of the time, the playwright process gets stuck and It never exits. I suspect that it is related to the Prisma client connection because I see these logs over and over when the tests have been completed (using DEBUG=*
):
This goes on forever and I have to manually Ctrl+C, which is not ideal for a CI environment
How to reproduce
So far I have not reached a reliable reproduction. For every 5 tests that I run, 3 of them get stuck and never exit.
I’d like to know if you can give me any hints at what may be causing this problem or how to properly manage my connections. It might be useful to consider that Playwright runs tests in parallel using worker processes.
Expected behavior
I expect the Playwright process to exit immediately after the tests have completed (either successful or unsuccessfully)
Prisma information
Environment & setup
- OS: KDE Neon 5.24
- Database: MySQL 8
- Node.js version: 14.17.4
Prisma Version
prisma : 3.13.0
@prisma/client : 3.13.0
Current platform : debian-openssl-1.1.x
Query Engine (Node-API) : libquery-engine efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/@prisma/engines/libquery_engine-debian-openssl-1.1.x.so.node)
Migration Engine : migration-engine-cli efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/@prisma/engines/migration-engine-debian-openssl-1.1.x)
Introspection Engine : introspection-core efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/@prisma/engines/introspection-engine-debian-openssl-1.1.x)
Format Binary : prisma-fmt efdf9b1183dddfd4258cd181a72125755215ab7b (at node_modules/@prisma/engines/prisma-fmt-debian-openssl-1.1.x)
Default Engines Hash : efdf9b1183dddfd4258cd181a72125755215ab7b
Studio : 0.459.0
Preview Features : fullTextSearch, fullTextIndex
Issue Analytics
- State:
- Created a year ago
- Reactions:3
- Comments:7 (4 by maintainers)
Top GitHub Comments
Hi! Since I created this issue this is not a problem anymore. The tests are closing the connection correctly now. I’m guessing it was a Playwright bug that got fixed
Thanks!
Awesome, thanks for the update!