Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

prisma-query-engine is not closing when the program is finished #357

Open
kidusdev opened this issue Apr 17, 2024 · 2 comments
Open

prisma-query-engine is not closing when the program is finished #357

kidusdev opened this issue Apr 17, 2024 · 2 comments

Comments

@kidusdev
Copy link

20240417_103731.jpg

prisma-query-engine is not closing when the program is exited. and it is taking space in memory even though our dart program is done. You have to manually kill the process in task manager... is there a way to close the engine

@medz medz closed this as completed Apr 18, 2024
@medz
Copy link
Owner

medz commented Apr 18, 2024

IMG_1005
https://prisma.pub/getting-started/setup.htm

This is a known problem. At present, I haven't found a better solution. Maybe the CABI engine will not have this problem in future versions.

@medz medz reopened this Apr 18, 2024
@roadroot
Copy link

roadroot commented Jul 7, 2024

Hello,

This resolves the issue for me :

main() {
  AppLifecycleListener(
    onExitRequested: () async {
      PrismaClient client = // your Prisma Client ;
      await client.$disconnect();
      return AppExitResponse.exit;
    },
  );
  runApp(const YourApp());
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants