I need help because I have been getting this console spam since this afternoon. I have tried everything, filter everything, but nothing works. I have 35 GB RAM and a 10-core CPU, the utilization is at 2-4% for both things. What can I do about it? I have already tried everything.
#txAdmin Support Request - EventEmitter Memory Leak Console Spam
1 messages · Page 1 of 1 (latest)
Well what did you add this afternoon
I have not added anything, I have had it checked by several devs and there is no script that could trigger this error
Thread hitch warnings are uhh, rather hard to debug honestly there’s a variety of things that can cause them including poorly optimized/underperforming scripts
The funny thing is that my server runs well and smoothly with 130 FPS and my players have no problems either
The event listeners thing is rather common Node.js relies heavily on garbage collection to manage memory, but it’s not magic. The warning in your screenshot:
MaxListenersExceededWarning: (node) warning: possible EventEmitter memory leak detected. 11 listeners added.
…means that one or more EventEmitters in your server are accumulating too many listeners without cleaning them up which can eventually lead to memory bloat and GC pressure.
The server here isn’t the issue
Something continuously calling nodes event emitters is (usually a script)
This actually typically isn’t a indication of an actual memory leak
But rather the processes are close to causing one
What can I do to fix this error
Can this be due to the normal esx scripts or just custom scripts
My suggestion would be to run the profiler fivem has or some similar tool as those are usually all that can truly help you figure out what exactly is the issue, is this a game server or?
Yes it is a roleplay server for GTA5
If you need help using it feel free to ask
I’m decent with it
But it’s pretty simple
This also could just be Node in general tbh
It’s actually known to abuse its garbage collection
The thing is until today at noon everything was fine then these errors came
:rocket: Congratulations @haughty willow, you leveled up to <@&828359841512816671>!
Was there uhh
A lot of server activity when the issues started popping up?
restart a server and then the problems came
Yeah it could be a false positive tbh
It’s not uncommon for Node
Where can I find my server's nodes
Node is a uhh
How can I explain this
Do you know what JavaScript is?
It’s a coding language
Node powers JavaScript
Lots of scripts use JavaScript
And most game servers come with it Which is likely why it’s in your system
Well to be honest I don't know anything about these server things other than writing scripts myself. Where can I best look or do you say test all scripts
So I'm a bit further now I just turned on the esx scripts the errors come there too I think it's the esx scripts
Honestly, as you’re someone with not a lot of experience in this. I’d start by removing scripts one by one (even just commenting them out in the server.cfg so they don’t start) essentially yeah you want to find what script is being a pain
Do you think that if I replace the script the error will go away or do I have to do something else
If the script is disabled it should no longer call the event emitters which should in turn get rid of the errors yes. If you restart it after removing a script and still have the error then that script wasn’t the issue. You also want to do a hard reboot here not just a reboot through txAdmin (you want to restart the entire server to ensure the processes are shut down) you typically do a hard reboot through your hosts panel
The error only occurs when a player is connected to the server
That’s…. Interesting
Do you have any custom scripts that trigger when a user joins?
Custom loading/connecting screen
Anything like that
Yes I have many such things but none of them started
Interesting, yeah I’d run the profiler or shutdown scripts until you find the culprit these issues can be hard to debug.
The profiler though is a powerful tool that’s very good at showing you how scripts and stuff are performing
That’s kinda what I was thinking
Can I install another version
You can try and use: https://github.com/CommunityOx/oxmysql
the original has been archived and they maintain it now if you are already using the latest version of it then honestly you may have to join their server and ask for help there they can help better with that then I can
are these errors bad
server thread hitch warning: timer interval of 224 milliseconds
This happens when uhh
It’s basically your server saying it’s lagging
But you already said the server itself is performing fine iirc so I’d say that the event emitter issue is making the server think it’s lagging
yes but my server can't be slow because my task manager shows something else
Can I fix this somehow
Windows
Do you have ssh access?
You said something about task manager
So I’m assuming you do
Yes
Can you run this:
node --trace-warnings
If it finds warnings
It should also give you some suggestions
I can't get any further. I've created a new oxmysql and the error still persists.
Someone in the fivem support server reported the same issue and was told basically the same thing I told you
Poorly optimized script
Or crap server hardware
And I read your hardware at the top of the channel so the hardware shouldn’t be a issue
If you truly think it’s ox
Documentation for Community Ox's resources for FiveM/RedM
There should be a discord icon at the top of that site ^^ somewhere
That takes you to their support server
Hi I can tell you that I found the error this was not oxmysql but some custom scripts that I had on it
Yeah i had a feeling it was some other script (ox is usually pretty stable)
finding what scripts is this issue though.... not as easy as most people think. That's why i kept suggesting you run the profiler cause its actually really good at its job and is made for situations like this
@haughty willowhow do u find it?