[Release] MySQL Async Library - 3.3.2

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…

I got a person on the ESX discord that’s getting:

Error running system event handling function for resource esplugin_mysql: citizen:/scripting/lua/scheduler.lua:41: 
Failed to execute thread: citizen:/scripting/lua/scheduler.lua:655: 
No such export mysql_fetch_all in resource mysql-async

Which tends to be start order but m-a is starting well before esplugin_mysql and all resources are starting without issue:

start mapmanager
start chat
start spawnmanager
start sessionmanager
start fivem
start hardcap
start ■■■■■■■
start scoreboard
start playernames
start mysql-async
start essentialmode
set mysql_debug false
start esplugin_mysql
start es_admin2
start async
start es_extended
start esx_menu_default
start esx_menu_list
start esx_menu_dialog

Would this be likely due to a slow mysql response time? Is there something else that could be causing it?

This might be a cache issue. I hope.

Hello sir I am the guy who is having the issue to which Schwim is talking about. I did delete the cache and it did not fix the issue still.

On which server version are you? Check

https://runtime.fivem.net/artifacts/fivem/build_server_windows/master/

Pretty sure im on the latest I can update anyway and try

Error: (node:18896) UnhandledPromiseRejectionWarning: TypeError: Cannot read property ‘3’ of null
at parseConnectingString (mysql-async.js:5049:30)
at global.on (mysql-async.js:5067:18)
at citizen:/scripting/v8/main.js:193:28
Error: (node:18896) 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:18896) [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.

Help please :slight_smile:

You are not using the latest version. It would tell you, your connection string is wrong.

set mysql_connection_string “mysql://root:@localhost/roleplay”

set mysql_connection_string “addr=localhost;uid=root;database=roleplay;pwd=”

Error: (node:23400) UnhandledPromiseRejectionWarning: Error: Empty mysql_connection_string detected.
at global.on (mysql-async.js:5066:49)
at citizen:/scripting/v8/main.js:193:28
Error: (node:23400) 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:23400) [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.

Write it out yourself and do not copy…

I do not understand I have set myself under myself and there is still the same mistake

You copied

"