GTA V version?
Everything up to date
Legit or Pirate copy?
Windows 10 Pro
Did you try to delete caches.xml and try again?
Zotac GTX 1080 Amp Extreme
What did you do to get this issue?
Client triggers a ServerEvent which triggers another ClientEvent
What server did you get this issue on?
My own testserver but it also happens on our liveserver (just was never seen until the latest update which introduced the resmon
What exactly happens:
I developed a script for our server which is mainly for syncing vehicles with the server.
It is not optimized as of now but while optimizing I found a weird issue with triggering events.
The client gets all informations from a vehicle once when exiting that vehicle and saves everything in an array (like engine health, position and so on). This array then gets send to the server by using TriggerServerEvent(). The server then manages all the information and depending on the ownership of the car this information has to be sent back to the owner of the vehicle via a TriggerClientEvent(). To make it easier and to make sure he gets everything I send ALL vehicles back to that client, which of course is a lot (actually way too much) of data.
Example: Client sends data -> server processes -> server sends back more data -> client receives this data but it NEVER leaves the memory
RegisterNetEvent('AdvancedParking:receiveAllVehicles') AddEventHandler('AdvancedParking:receiveAllVehicles', function(_allVehicles) [...] end)
_allVehicles is usually around 3MB of data on our liveserver (which is way too much, I know), but everytime this event gets triggered (even if the event is empty!), it adds the 3MB to the memory usage but it never releases them. As if the lua garbagecollector never grabs it.
I narrowed it down as far as I could… and the only thing left are the events happening.
Our server i getting a major update nonetheless with a lot of custom scripts and of course we want to optimize as much as we can, but this just confuses me D:
Feel free to ask if you didn’t get something I said here xD