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

Error in "apollo example of this repo", and also error while using "type-graphql" #115

Open
Iran-110 opened this issue Nov 28, 2024 · 0 comments

Comments

@Iran-110
Copy link

Iran-110 commented Nov 28, 2024

After 10 changes, saving and refreshing the page, I encountered this error:

(node:26662) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
(Use `node --trace-warnings` ... to show where the warning was created)

I also got this error in my local project.

In addition to this error, other errors also occur:

  • My project uses type-graphql.
  • At each step, by changing the content of a Resolver, the application is reset to run the server with the newer version.
  • But the previous storage of reflect-metadata (belonging to "type-graphql") is not cleared.
  • So, for example in my project after each reset the line below increments by 8 (the number of @Args and @Root of the file)
console.log("TypeGraphQL Functions' Param Decorators:", getMetadataStorage().params.length)
>> 278 (first run)
>> 286 (second run)
>> 294
>> 302
>> 310
>> 318
>> 326
>> 334
>> 342
>> 350
(node:24658) MaxListenersExceededWarning: Possible EventEmitter memory leak detected. 11 SIGTERM listeners added to [process]. MaxListeners is 10. Use emitter.setMaxListeners() to increase limit
    at genericNodeError (node:internal/errors:984:15)
    at wrappedFn (node:internal/errors:538:14)
    at _addListener (node:events:593:17)
    at process.addListener (node:events:611:10)
    at file:///path-to-projct/node_modules/@apollo/server/dist/esm/ApolloServer.js:245:21
    at Array.forEach (<anonymous>)
    at ApolloServer.maybeRegisterTerminationSignalHandlers (file:///path-to-projct/node_modules/@apollo/server/dist/esm/ApolloServer.js:244:17)
    at ApolloServer._start (file:///path-to-projct/node_modules/@apollo/server/dist/esm/ApolloServer.js:191:40)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ApolloServer.start (file:///path-to-projct/node_modules/@apollo/server/dist/esm/ApolloServer.js:114:16)
>> 358
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

1 participant