#txAdmin Support Request - EventEmitter Memory Leak Console Spam

1 messages · Page 1 of 1 (latest)

haughty willow
#

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.

fluid folio
#

Well what did you add this afternoon

haughty willow
#

I have not added anything, I have had it checked by several devs and there is no script that could trigger this error

upper sage
haughty willow
#

The funny thing is that my server runs well and smoothly with 130 FPS and my players have no problems either

upper sage
#

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.

upper sage
#

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

haughty willow
#

What can I do to fix this error

#

Can this be due to the normal esx scripts or just custom scripts

upper sage
haughty willow
#

Yes it is a roleplay server for GTA5

upper sage
#

If you need help using it feel free to ask

#

I’m decent with it

#

But it’s pretty simple

upper sage
#

It’s actually known to abuse its garbage collection

haughty willow
#

The thing is until today at noon everything was fine then these errors came

severe cedarBOT
upper sage
#

A lot of server activity when the issues started popping up?

haughty willow
#

restart a server and then the problems came

upper sage
#

It’s not uncommon for Node

haughty willow
#

Where can I find my server's nodes

upper sage
#

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

haughty willow
#

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

upper sage
haughty willow
#

Do you think that if I replace the script the error will go away or do I have to do something else

upper sage
# haughty willow Do you think that if I replace the script the error will go away or do I have to...

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

haughty willow
#

The error only occurs when a player is connected to the server

upper sage
#

Do you have any custom scripts that trigger when a user joins?

#

Custom loading/connecting screen

#

Anything like that

haughty willow
#

Yes I have many such things but none of them started

upper sage
haughty willow
#

the error is Oxmysql

upper sage
haughty willow
#

Can I install another version

upper sage
# haughty willow 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

GitHub

MySQL resource for FXServer. Contribute to CommunityOx/oxmysql development by creating an account on GitHub.

haughty willow
#

are these errors bad

server thread hitch warning: timer interval of 224 milliseconds

upper sage
#

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

haughty willow
#

yes but my server can't be slow because my task manager shows something else

#

Can I fix this somehow

upper sage
#

What kind of server is this?

#

What operating system

haughty willow
#

Windows

upper sage
#

You said something about task manager

#

So I’m assuming you do

haughty willow
#

Yes

upper sage
#

If it finds warnings

#

It should also give you some suggestions

haughty willow
#

I can't get any further. I've created a new oxmysql and the error still persists.

upper sage
# haughty willow Yes

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

#

There should be a discord icon at the top of that site ^^ somewhere

#

That takes you to their support server

haughty willow
#

Hi I can tell you that I found the error this was not oxmysql but some custom scripts that I had on it

upper sage
#

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

long snow
#

@haughty willowhow do u find it?