So ive been slowly updating my server over the past month from my V1.
I went to put V2 out yesterday but noticed the ram usage wasn’t right…
It loads up at 70.0mb ram usage which is normal for my server.
but every query the runs causes the ram usage to go up, and it doesnt let go, it just keeps rising. even if the server has 0 players, the ram will still be capped where it last was and will not release and go down
Here is a GiF of what happens under load:
Here is after this with 0 player:
and now its just locked at that value and wont let go?
On my V1 server is happily fluctuates from 75-95mb and never goes above (thats with 32 players)
V1 is none async, V2 is async with all scripts updated.
Ive tried V2 on 2 servers and my local system and the issue still persists, I have removed any kind of addon, replacement, texture addon anything modded. same issue
Im at a loss right now and are coming to you for help
Right now im starting to think async is opening querys and not letting them go
Any help would be appriciated!
I have tried to explain this the best i can, if you need more info let me know.
When you say async ? Is this by using async method instead of sync ? Or is this by using the mysql async lib instead of the essential mod api for mysql ?
Please note that each async call in the mysql-async lib will do the following :
Create a connection
Create a command
Create an Async Task for the query
Transform the result of the async task to something compatible for Lua
and now its just locked at that value and wont let go?
Do you mean that the memory stop growing at a certain value ? As it may be normal then that the memory grows, as the underlying use pooling and keep some objects in memory to avoid tcp connection round trip and save times (however 800mo is a lot for pooling only)
It may just be normal and the garbage collector of mono knows that there is enough memory to consume and so don’t try to free some objects (which is better because invoking garbage collector too often can lead to bad cpu performances) But i’m not an expert on how the GC of mono works.
using async to an alternative to the essential mode, So i guess the full package?
all my scripts are async apart from maybe 3
and when i it wont let go, whatever usage the server creates it never lets that ram usage go it just keeps building contantly till there is no room left