Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix ressource usage #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Fix ressource usage #20

wants to merge 2 commits into from

Conversation

mrx8
Copy link

@mrx8 mrx8 commented Aug 22, 2024

The #client.on()-calls will install the handlers forever.
In long running instances, each request installs a handler which will subsequently be called on each message which is received. That means it will pile up, soak up ultimately all memory and increase CPU on the path to hell ;)
The solution could be .once() instead of .on()

@thaschbe
Copy link

Thank you very much mrx8! Just installed, and now in the long run test!

@mrx8
Copy link
Author

mrx8 commented Oct 12, 2024

I am glad that you have not given up on your project!

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

Successfully merging this pull request may close these issues.

2 participants