[Release] MySQL Async Library - 3.3.2

Meaning I bought a vps/rootserver from zap-hosting and am running my server off that.

So what you’re saying is you run a FiveM server on a VPS. You install it like any other resource.

What I’m saying is I don’t know how to set up a data base to get this to work with another mod

That mod should offer you an sql file. You need to have an SQL server somewhere

Hello, im getting an error whenever a player joins. https://gyazo.com/b502aaf7c39c4396e916ebd324d826c3

can someone help me I have this MYSQL error

Ideas?
[ERROR] [MySQL] An critical error happens on MySQL for query “SELECT * FROM addon_account_data WHERE account_name = @account_name {@account_name=bank_savings}”: Object reference not set to an instance of an object at MySqlConnector.Core.ConnectionPool.GetPool (System.String connectionString) [0x0001a] in <149068887d4e4bc08e7b4c05a59a923b>:0

at MySql.Data.MySqlClient.MySqlConnection+<CreateSessionAsync>d__83.MoveNext () [0x00012] in <149068887d4e4bc08e7b4c05a59a923b>:0

Loaded MySQLAsync.net, Version=2.1.1.0, Culture=neutral, PublicKeyToken=null into ScriptDomain_1702487978

same problem

System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) [0x00029] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.ThrowHelper.ThrowArgumentOutOfRangeException () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Collections.Generic.List`1[T].get_Item (System.Int32 index) [0x00009] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at (wrapper dynamic-method) System.Object:CallSite.Target (System.Runtime.CompilerServices.Closure,System.Runtime.CompilerServices.CallSite,object,int)
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet] (System.Runtime.CompilerServices.CallSite site, T0 arg0, T1 arg1) [0x0010f] in <48501e5f32e8491e924f8b8beae3e4f6>:0
at CitizenFX.Core.MsgPackDeserializer+<>c__DisplayClass36_1.b__1 (System.Object res, System.Object err) [0x00246] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\MsgPackDeserializer.cs:290
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00032] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
— End of inner exception stack trace —

Server stack trace:
at System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00048] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x000e7] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
at CitizenFX.Core.FunctionReference.Invoke (System.Int32 reference, System.Byte[] arguments) [0x00062] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\FunctionReference.cs:65
at CitizenFX.Core.InternalManager.CallRef (System.Int32 refIndex, System.Byte[] argsSerialized, System.IntPtr& retvalSerialized, System.Int32& retvalSize) [0x00000] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\InternalManager.cs:273
at (wrapper remoting-invoke-with-check) CitizenFX.Core.InternalManager:CallRef (int,byte[],intptr&,int&)
at (wrapper xdomain-dispatch) CitizenFX.Core.InternalManager:CallRef (object,byte[]&,byte[]&,int,byte[],int&)

Exception rethrown at [0]:
at (wrapper xdomain-invoke) CitizenFX.Core.InternalManager:CallRef (int,byte[],intptr&,int&)
at (wrapper remoting-invoke-with-check) CitizenFX.Core.InternalManager:CallRef (int,byte[],intptr&,int&)
at CitizenFX.Core.MonoScriptRuntime.CallRef (System.Int32 refIndex, System.Byte[] argsSerialized, System.Int32 argsSize, System.IntPtr& retvalSerialized, System.Int32& retvalSize) [0x00013] in C:\gl\builds\4ff63adb\0\cfx\fivem\code\client\clrcore\MonoScriptRuntime.cs:195
Error resuming coroutine: citizen:/scripting/lua/MessagePack.lua:830: missing bytes
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/MessagePack.lua:830: in method ‘underflow’
citizen:/scripting/lua/MessagePack.lua:465: in field ‘any’
citizen:/scripting/lua/MessagePack.lua:860: in field ‘unpack’
citizen:/scripting/lua/scheduler.lua:626: in field ‘cb’
citizen:/scripting/lua/scheduler.lua:397: in function citizen:/scripting/lua/scheduler.lua:387

Does anyone know how to resolve this error?

Try unloading some of your broken scripts. Comment them out and then test again one by one, uncommenting them out to see which one is the problem child. Seeing you have ESX, I am sure there are a ton of buggy/broken scripts.

An easy way to find the problem is go through the code in the Lua scripts and specifically look at their mysql query for one that might be performing a locking read. Another way is to run a query in mysql by doing

SET GLOBAL innodb_print_all_deadlocks = ‘ON’;

or

SET GLOBAL innodb_print_all_deadlocks = 1;

If that deadlock happens again, immediately go into MySQL Workbench or whatever you are using and run:

SHOW ENGINE INNODB STATUS;

Another way to nail it down, is to look through your mysql error log.

The reason for that happening in a nutshell is because one thing is locking, lets say Users then is waiting to hold a lock on Jobs while at the same exact time another script is locking Jobs, while trying hold a lock on Users. Boom … deadlocked.

A proper fix would be to fix the transactions that issue select and update statements to multiple tables, to have all the scripts to call the tables in the same exact order.

I’m having this error when I disconnect from the server, but I realized that it is the esx_locksystem, I just do not know how to solve it.

Nebel im getting that. I downloaded this from zap. Im not sure if its supposed to be like that or is there another confirmation message or something that is supposed to be outputted

i clear the cache, reinstall everything it works fine now

Upon player first connect I am receiving this error…I have tried a few things that others were reporting but no luck. Am I missing something

1 Like

Hi,
Check pull request :

Perfect seem to resolve my error perfectly. Is anyone using gcphone with the latest sql update? Players reporting of a white screen when going to messages… Relogging and clearing cache a few times resolved it for a short period of time

127.0.0.01 <<< change 127.0.0.1

Look for help with this? everytime I start fivem it gives error. Any advice will be helpful?

[MySQL] [Slow Query Warning] [esx_society] [10021ms] SELECT * FROM jobs
[ERROR] [MySQL] [esx_society] An error happens on MySQL for query “[object Object]”: Handshake inactivity timeout
[MySQL] [Slow Query Warning] [esx_property] [10012ms] SELECT * FROM properties
[ERROR] [MySQL] [esx_property] An error happens on MySQL for query “[object Object]”: Handshake inactivity timeout
[MySQL] [Slow Query Warning] [esx_datastore] [10008ms] SELECT * FROM datastore
[ERROR] [MySQL] [esx_datastore] An error happens on MySQL for query “[object Object]”: Handshake inactivity timeout
[MySQL] [Slow Query Warning] [esx_addoninventory] [10004ms] SELECT * FROM items
[ERROR] [MySQL] [esx_addoninventory] An error happens on MySQL for query “[object Object]”: Handshake inactivity timeout
Error: (node:23500) UnhandledPromiseRejectionWarning: Error: Handshake inactivity timeout
at Handshake. (mysql-async.js:5826:17)
at emitNone (events.js:106:13)
at Handshake.emit (events.js:208:7)
at Handshake._onTimeout (mysql-async.js:321:8)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5)
--------------------
at Protocol._enqueue (mysql-async.js:5807:48)
at Protocol.handshake (mysql-async.js:5714:23)
at PoolConnection.connect (mysql-async.js:720:18)
at Pool.getConnection (mysql-async.js:4577:16)
at Pool.query (mysql-async.js:4731:8)
at Promise (mysql-async.js:4970:12)
at new Promise ()
at execute (mysql-async.js:4967:26)

I saw this posted a thousand times but i’m unable to fix it
so please help :sweat_smile:

Error: (node:22711) UnhandledPromiseRejectionWarning: Error: No valid connection string found
at parseConnectingString (mysql-async.js:5058:18)
at global.on (mysql-async.js:5067:18)
at citizen:/scripting/v8/main.js:202:28
Error: (node:22711) 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:22711) [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.

I am running Ubuntu 18 and this happens on a server startup

1 Like