-
Notifications
You must be signed in to change notification settings - Fork 1
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
EventTarget MaxListenersExceededWarning #91
Comments
I noticed the same. This seems to be because of a problem in Node's native fetch-api implementation undici: nodejs/undici#1711 If you are using the Docker container, then you have an old version. I'll update Node to latest LTS version, let's see if the problem goes away with that. Otherwise, this could be a subtle bug in the cancellation/retry code. |
Version 1.2.1 released! |
Unfortunately I am still seeing the issue in my logs. |
Thanks for reporting this. Back to the drawing board then! This might be related to for example long polling BluOS players. However, before increasing the amount of maximum listeners I'd like to make sure that the current request cancellation implementation or the fetch api wrapper library do not leak listeners, because the error message would be exactly the same. |
Absolutely, take your time. Makes sense to find the root cause and not mask real errors. =) |
I released a new version v1.3.0 with a bugfix for cancellation using AbortSignal. Can you try that @zquestz? You can also try running with |
I have updated to the latest release and will get back to you. 😀 |
Unfortunately I am seeing the log warnings with the latest release. =\ Should I try updating that ENV var? |
Yes, that'd be great! |
@zquestz I noted that there's something wrong with scrobbling in the latest release. I'll release a patch release once I've had chance to fix. |
v1.3.1 fixes accidentally broken long polling. Sorry about that. Please provide any additional information that you can find @zquestz, this is a difficult issue to reproduce with my setup. |
Still seeing the exact same error:
Odd thing is that I have |
This is really weird. Practically it would mean that event listeners are leaking that would eventually cause the out of memory killer to stop the container so you would see crashing. I could try to run a profiler to see how the memory footprint develops over time. If you are not seeing a memory leak, it means that Node's undici still produces this warning for some reason but it is harmless. I guess you have double checked already that you have the latest container? One could also switch away from using fetch API, but as it is becoming the standard in Node it does not seem worth it. |
You were totally right, updating the image on my Synology and restarting the container was not enough to get the new version. It is now updated and testing continues. =) |
All appears to be working fantastic now. =) |
Great to hear that it works now! I have run into something similar when updating images locally. Cache invalidation, the hardest of problems. 😂 The new releases are tagged with both the version number and "latest". Let's keep this issue still open for a little while if something still comes up related to this. |
Everything seems to be working, so I'm closing this issue for now. Thank you for helping to make the project better! 🙏 |
My pleasure. Thanks for all the help! |
Seeing the following in my logs.
date,stream,content
2024/09/18 09:14:59,stdout,(node:1) MaxListenersExceededWarning: Possible EventTarget memory leak detected. 11 abort listeners added to [AbortSignal]. Use events.setMaxListeners() to increase limit
Can we set the default a little higher? It defaults to 10 but my setup is a little larger.
The text was updated successfully, but these errors were encountered: