[Release] MySQL Async Library - 3.3.2

Error running call reference function for resource mymode: citizen:/scripting/lua/scheduler.lua:403: mymode_server.lua:10: attempt to index a nil value (field ‘?’)
stack traceback:
mymode_server.lua:10: in upvalue ‘ref’
citizen:/scripting/lua/scheduler.lua:389: in function citizen:/scripting/lua/scheduler.lua:388
[C]: in function ‘xpcall’
citizen:/scripting/lua/scheduler.lua:388: in function citizen:/scripting/lua/scheduler.lua:387
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:403: in function citizen:/scripting/lua/scheduler.lua:372
Error: Unhandled error: Error: BUFFER_SHORTAGE
Error: BUFFER_SHORTAGE
at n.e [as reserve] (citizen:/scripting/v8/msgpack.js:29:12766)
at h (citizen:/scripting/v8/msgpack.js:29:15761)
at n.r [as decode] (citizen:/scripting/v8/msgpack.js:29:13908)
at n.fetch (citizen:/scripting/v8/msgpack.js:29:6972)
at n.u [as read] (citizen:/scripting/v8/msgpack.js:29:12076)
at Object.n [as decode] (citizen:/scripting/v8/msgpack.js:29:7097)
at unpack (citizen:/scripting/v8/main.js:20:33)
at citizen:/scripting/v8/main.js:51:11
at setImmediate (mysql-async.js:4962:9)
at Object.callback (citizen:/scripting/v8/timer.js:56:6)

Where is problem? ???

your server version.

Is there any way to check my CURRENT version of server (using zaphost) so that i can see if that could be the problem if its old so i just can upgrade?

[MySQL] [Slow Query Warning] [esx_eden_garage] [85ms] SELECT * FROM owned_vehicl
es WHERE owner=‘steam:110000113a7xxxx’
[MySQL] [Slow Query Warning] [esx_eden_garage] [56ms] SELECT * FROM owned_vehicl
es WHERE owner=‘steam:110000113a7xxxx’

AddEventHandler('playerConnecting', function(playerName, setKickReason)
	local pName = GetPlayerName(source)
	print(pName)
	MySQL.Async.fetchAll("SELECT * FROM `needrp_postacie` WHERE `p_name` = @pName",
	{
		['@pName'] = pName
	},
		function(result)
		print(#result)
		if result then
			print('Nie Znaleziono gracza')
		else
			print('Znaleziono gracza')
		end
    end)
end)

How to correctly check if the player’s account is in the database?

@zr0iq Can you have a look at this for me?

mysql-async.js error on server boot

Error: (node:19044) UnhandledPromiseRejectionWarning: Error: No valid connection string found
at parseConnectingString (mysql-async.js:5036:18)
at global.on (mysql-async.js:5043:18)
at citizen:/scripting/v8/main.js:193:28
Error: (node:19044) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
Error: (node:19044) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

need help to fix error
thank you
milo

I’m also having this isseu. Tried to downgrade to version 3.0.2 and see if that fixes it. Happens when there are more than 10-15 players online.

Even with the older version this starts to happen after 30 minutes. Must be some resource doing it.

this is on server boot no when playing

whenever I upgrade to the newest mysql-async (3.0.8) my server freezes of commands and all that. It only happens when players starts joining, any advices? running on newest es_extended

Which server version are you on?

Currently I’m on 2.1.1.0

Server version. The artifacts, not mysql-async.

1 Like

I was using the latest version when this was happening. I’m now reinstalling again all the scripts and will try this one more time >.<

i fix the error.
i was using this in the server config
set mysql_connection_string “addr=127.0.0.1;uid=username;database=essentialmode;pwd=password”

and i changed to this code and all worked
set mysql_connection_string “server=127.0.0.1;database=essentialmode;userid=username;password=password”

oh well, I’m on an old version of mysql-async. Doesn’t really say.

Hey everyfing worked find when i installed the basics for ESX but first start up and i got this error anybody that can help me?

@Ogge0101 use localhost in the connection string.
@gamziboi server version, but I think you use according to some other topic zap anyways?
@Beardlife you need to give some more information than, I got issue x,y,z? Maybe update your artifacts version.

Hi @zr0iq
First of all thank you for the work done on this version!

However, on my test server, i have a [MySQL] [Slow Query Warning].

[MySQL] [Slow Query Warning] [esplugin_mysql] [842ms] UPDATE users SET `bank`=229643,`money`=2150 WHERE `identifier`='steam:xxxxxxxxxxxxxxx'
[MySQL] [Slow Query Warning] [esplugin_mysql] [1106ms] UPDATE users SET `bank`=23703,`money`=119045 WHERE `identifier`='steam:steam:xxxxxxxxxxxxxxx'

~ 520 users.

Simple question :
These are just warnings ? And to avoid this, we should review the MysQl requests ?

I have the last artefact version for linux and the last version of your mysql-async.
Version of mysql : Server version: 10.1.37-MariaDB-0+deb9u1 Debian 9.6

Cordially,
Hal.