Auto-disconnect
See original GitHub issueRight now users need to explicitly call await prisma.disconnect()
at the end of their program otherwise the running Node process won’t terminate.
Ideally the Prisma Client (or more correctly: the used Prisma Query Engine) should automatically disconnect when the Node process is trying to terminate. This removes a lot of friction points and simplifies the usage of Prisma Client - especially when getting started - since users don’t need to call await prisma.disconnect()
explicitly anymore.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:20
- Comments:10 (7 by maintainers)
Top Results From Across the Web
The amount of idle time required before suspending a session ...
Registry Hive: HKEY_LOCAL_MACHINE Registry Path: \System\CurrentControlSet\Services\LanManServer\Parameters\ Value Name: AutoDisconnect
Read more >Mapped drive is disconnected - Windows Client
Type autodisconnect, and then press ENTER. On the Edit menu, click Modify. Click Hexadecimal. In the Value data box, type ffffffff, and ...
Read more >How do I configure LAN autodisconnect? - ITPro Today
Start the registry editor (regedit.exe) · Move to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters · Double click autodisconnect · Set ...
Read more >Network Drives Disconnect
Type autodisconnect, and then press ENTER. On the Edit menu, click Modify. Click Decimal. In the Value data box, type 0, and then...
Read more >autoDisconnect - IBM
The autoDisconnect property allows a DataBlox to disconnect from the data source automatically when the application no longer requires a connection, ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The assumption was, that if we start the Prisma process as a
detached
child process, Node.js still could properly exit, once the event loop is empty.However, the problem is, that we still need to keep a stream to the process’ stderr and stdout open. These streams will still prevent the Node.js process from exiting.
We can revisit this topic once we have replaced the HTTP server with Neon bindings, as that will fundamentally change the interaction between Node.js and Rust for Prisma Client.
Issue for Neon Bindings: https://github.com/prisma/prisma/issues/767
@meotimdihia This will be soon resolved via https://github.com/prisma/prisma/issues/4911 as then node can directly call rust function instead of spawning a binary process. It is close to completion and being released in preview so stay tuned.