[Release] MySQL Async Library - 3.3.2

Ask the resource running the queries to improve their resources.

Would you recommend me to switch from using * to specified From?

Started resource vVoice
Started resource wastedscreen
Started resource Weaponry
Started resource welcome
Started resource wnc
Started map first_spawn
Started resource first_spawn
Started resource synn-loadscreen
Started resource NativeUI
Started resource EasyAdmin
Started resource EasyAdmin-MySQL
Couldn’t find resource scrambler-vac.
Authenticating server license key…
Server license key authentication succeeded.cfx> Welcome!
Sending heartbeat to live-internal.fivem.net:30110

Current version: 5.0.3
Updater version: 5.0.3

Everything is fine!

executed table query
[MySQL] [Slow Query Warning] [esx_eden_aircraftgarage] [128ms] UPDATE owned_airc
rafts SET state=true WHERE state=false
[MySQL] [Slow Query Warning] [es_extended] [90ms] SELECT * FROM items
[MySQL] [Slow Query Warning] [EasyAdmin-MySQL] [112ms] CREATE TABLE IF NOT EXIST
S ea_bans( banid int(11) NOT NULL UNIQUE AUTO_INCREMENT, expire double NOT
NULL DEFAULT ‘10444633200’, identifier text NOT NULL, steam text NOT NULL,
reason text NOT NULL, PRIMARY KEY(banid))
[MySQL] [Slow Query Warning] [esx_eden_boatgarage] [128ms] UPDATE owned_boats SE
T state=true WHERE state=false
[MySQL] [Slow Query Warning] [esx_vehicleshop] [104ms] SELECT * FROM vehicle_cat
egories
[MySQL] [Slow Query Warning] [esx_addonaccount] [110ms] SELECT * FROM addon_acco
unt
[MySQL] [Slow Query Warning] [esx_addoninventory] [98ms] SELECT * FROM items
[MySQL] [Slow Query Warning] [esx_datastore] [96ms] SELECT * FROM datastore
[MySQL] [Slow Query Warning] [esx_boatshop] [129ms] SELECT * FROM boat_categorie
s
[MySQL] [Slow Query Warning] [statsonline] [145ms] UPDATE users SET online = 0
WHERE online = 1
[MySQL] [Slow Query Warning] [esx_shops] [97ms] SELECT * FROM items
[MySQL] [Slow Query Warning] [esx_society] [98ms] SELECT * FROM jobs
[MySQL] [Slow Query Warning] [esx_whitelis] [95ms] SELECT * FROM whitelist
[MySQL] [Slow Query Warning] [esx_aircraftshop] [100ms] SELECT * FROM aircraft_c
ategories
[MySQL] [Slow Query Warning] [esx_eden_garage] [167ms] UPDATE owned_vehicles SET
state=true WHERE state=false
hitch warning: frame time of 1295 milliseconds
EasyAdmin (EasyAdmin) is up to date!
All users have been set to offline
retrieved banlist
[MySQL] [Slow Query Warning] [esx_addoninventory] [55ms] SELECT * FROM addon_inv
entory
[MySQL] [Slow Query Warning] [esx_addonaccount] [63ms] SELECT * FROM addon_accou
nt_data WHERE account_name = ‘society_ambulance’
[MySQL] [Slow Query Warning] [esx_datastore] [60ms] SELECT * FROM datastore_data
WHERE name = ‘user_ears’
[MySQL] [Slow Query Warning] [esx_boatshop] [63ms] SELECT * FROM boats
[MySQL] [Slow Query Warning] [esx_aircraftshop] [64ms] SELECT * FROM aircrafts
[MySQL] [Slow Query Warning] [esx_society] [69ms] SELECT * FROM job_grades
Sending heartbeat to live-internal.fivem.net:30110
retrieved banlist
Sending heartbeat to live-internal.fivem.net:30110
Sending heartbeat to live-internal.fivem.net:30110
retrieved banlist
Sending heartbeat to live-internal.fivem.net:30110

No because the issue is that they select the entire table at once. Kinda fails mysql as a storage solution.

haha thanks for the fix

I have to check the problem caused by my server. Not responding after several hours. Would you recommend me that the problem was not caused by mysql.

mysql-async 3.0.x is pretty stable. If the issue is database related, it is usually because of badly written queries or badly optimizied tables.

Refer to

to find out what is causing hitches, and optimizing your database structure.

Hey, I’m having an issue with this resource, I’ve checked the line number 20 in server.lua and as far as I can see it, the code there is correct, so I don’t know what’s happening, could someone help?

imagem

Is this in your __resource.lua

'@mysql-async/lib/MySQL.lua'

loaded as a server script?

no is not sir, thanks.

I get BUFFER SHORTAGE with Mysql-async 3.0.8 but 3.0.7 works perfectly fine for my server. Anyone else with the same issue? I can give more details if anyone needs them.
EDIT: So it seems that that it was bad caches, I cleared the one for mysql-async and its working all good now.

I have a problem when I use it for a while. The server hangs chat. The chat is not responding. Check that cmd can not print anything.


I will encounter problems when more than 10 players, but if I use 2.1.2, I do not experience a problem, but I have encountered a delayed mysql response.

Same thing is happening on my server…

After a while we’re not able to write in chat, take service, eat, drink etc
There’s no error in server console or in F8 console

Odd, how about providing specifics? Maybe finding out what is causing the hang?

It is not happening for me. I run a similar but different mysql implementation all day.

I can’t find anything specific… There is no error at all in both console
I’ve tryed asking my player their logs too and there’s no problem

The server just seem to “crash” but stay online, nobody can join, eat, drink, chat etc

You might want to try link the instructions in this one, given you run on windows.

Yeah I saw it…
I can give it a try, but the problem is that we can’t run it for a long time since it will take disc space
But my server can be 40 hours online without any problem and the next day it will crash 3 times

well you should only trace 30-60s, around the issue happening.

Hey,

I’ve set up a new project with the mysql-async library installed. It loads perfectly fine and everything goes according to plan, until I make an sql call. When ever I do so, it will just close the FXServer window and not display any crash logs, not even in the mysql error logs.

My call looks like the following (just a test call, because I couldnt get any mysql calls working):

function isWhiteListed(identifier)
		MySQL.ready(function ()
		    MySQL.Sync.fetchScalar('SELECT @parameters', {
		        ['@parameters'] =  'string'
		    })
		end)
		
		--return player
		return nil
end

Any ideas @zr0iq ?

MySQL.ready(function ()
  local p = MySQL.Sync.fetchScalar('SELECT @parameters', {
    ['@parameters'] =  'string'
  })
  print(p)
end)

returns string for me like it should.

Just tested it, “kinda” works but still not.
All I saw in the command window, was it starting to type “st” (as a part of “string” I assume) before it closed the FXServer window.

UPDATE:
Just tested it without the function call, now it works fine and outputs string. Interesting…