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

N-API feature creates memory leak #7092

Closed
chemicalkosek opened this issue May 14, 2021 · 0 comments · Fixed by prisma/prisma-engines#1929
Closed

N-API feature creates memory leak #7092

chemicalkosek opened this issue May 14, 2021 · 0 comments · Fixed by prisma/prisma-engines#1929
Assignees
Labels
bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. team/client Issue for team Client. topic: node-api formerly `nApi`
Milestone

Comments

@chemicalkosek
Copy link

chemicalkosek commented May 14, 2021

Bug description

Using N-API preview feature creates a memory leak with Prisma 2.22.1
Container which usually takes about 200MB after two-three days rises to 800MB (not heavy load server)
Actually two containers as it's load balanced over two containers in order to utilize two CPU's.
I noticed by getting notifications from netdata about low free memory

Additional info:
I actually had the same issue a month ago while using earlier Prisma (also reported on Slack).
I have since then disabled N-API and had no memory issues to this day.
In the meantime a fix for the issue was made here prisma/prisma-engines#1856
I have now upgraded to 2.22.1 (where the mentioned fix is), re-enabled N-API and unfortunately
noticed the same issue with memory usage rise.

How to reproduce

  1. Enable N-API
  2. Observe memory usage rise :)

Expected behavior

Should be no memory rise.

Prisma information

Environment & setup

  • OS: Ubuntu 20.04 on Digital Ocean with Dokku
  • Database:PostgreSQL
  • Node.js version 14
  • Prisma version: 2.22.1
  • Fastify with Mercurius
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/0-unknown Bug is new, does not have information for reproduction or reproduction could not be confirmed. kind/bug A reported bug. team/client Issue for team Client. topic: node-api formerly `nApi`
Projects
None yet
5 participants