PrismaP
Prisma5mo ago
4 replies
codehelix

MaxListenersExceededWarning: Possible EventEmitter memory leak detected

I have a test suite (node test) that tests our Prisma data model. Using 6.14 and earlier, everything worked fine. But starting with 6.15 (and still happens in 6.16.1), I started getting this warning in the console:

MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 error listeners added. Use emitter.setMaxListeners() to increase limit
at _addListener (file:///Users/marcus/xsignal/messaging-common/node_modules/@neondatabase/serverless/index.mjs:322:10)
at kn.addListener (file:///Users/marcus/xsignal/messaging-common/node_modules/@neondatabase/serverless/index.mjs:325:8)
at Un._release (file:///Users/marcus/xsignal/messaging-common/node_modules/@neondatabase/serverless/index.mjs:1129:77)
at kn.release (file:///Users/marcus/xsignal/messaging-common/node_modules/@neondatabase/serverless/index.mjs:1129:39)
at NeonTransaction.commit (file:///Users/marcus/xsignal/messaging-common/node_modules/@prisma/adapter-neon/dist/index.mjs:565:17)
at <anonymous> (/Users/marcus/xsignal/messaging-common/node_modules/@prisma/driver-adapter-utils/src/binder.ts:123:23) {

(note, I get the same issue when using the PG driver instead of the Neon driver)

Has anyone else seen this? I'm using a single Prisma client for my tests.

Thanks,
Marcus
Was this page helpful?