fivem-mysql-async
fivem-mysql-async copied to clipboard
Under high load, Slow Query Warnings keep getting higher until the (ESX) server crashes
Hi, I've been having this issue for several months now.
I have a highly populated ESX server, and under high load (variable amounts of load depending on silent crashers or unknown circumstances), it starts giving higher and higher Slow Query Warnings, until they get too high, mysql-async hangs, there are no connections available (@ mysql-async), the main MySQL-dependant scripts hang, the server itself hangs until it crashes.
It used to give more verbose info about the hangs and create a crashdump, now it just gets forcefully restarted by txAdmin.
It probably is an optimization issue (plus some silent crashers triggering likely-vulnerable events that make MySQL calls), but while I can do something about optimizing the serverside code (and more specifically the MySQL calls), is there no way to throw some brute power at the problem by editing some settings/variables? the dedicated server is very powerful and it's NOT a problem of system resources.
Thanks in advance.
Any additional info would be nice?
Configuration that does not include (server, database, password, and user).
And maybe a log file (from mysql-async)?
If the log file does not include a database version, that one would be nice if provided too.
How can I prevent the log file from being overwritten when the server restarts? Am I wrong if I think the most useful info would precisely be the latest lines before a crash? the problem is, txAdmin automatically restarts the server after a crash, so mysql-async.log gets overwritten.
We're using Windows Server 2019, MariaDB 10.4 (have used 10.2, 10.3 and MySQL8 until you warned against it) and our (up-to-date) FXServer is using an old es_extended version (~1.1), with ~46 resources that use mysql-async. Here's the connection string: set mysql_connection_string "server=localhost;port=3306;uid=USER;password=PASS.;database=DB;charset=utf8mb4_bin"
. I had the keepAlive CVAR for a while but I recently removed it, without perceiving any effect.
I have a sample mysql-async.log but it doesn't contain the latest lines before a crash because of what I mentioned (the log gets overwritten after a restart). 67K queries in ~ 5h30m under fairly high load. Is there a way I could send it to you without making it public? as it contains some users' identifiable information.
The keepAlive is only useful if your server does not run any queries within 8h.
You can contact me via discord. A discord server for FiveM related mysql issues has been setup.
I'll add a start-date to the log files so they do not overwrite in the next patch.
Hi @GHMatti ! We're having the exact same issue, any way to get in touch with you on Discord to talk about this and find the issue? :) Cheers.
Curious to see if there is a fix for this. Even is there is a way to reduce the warnings on it
Same issue on my side. Did you find a fix? Is it a mysql issue or resource related?
How can I prevent the log file from being overwritten when the server restarts? Am I wrong if I think the most useful info would precisely be the latest lines before a crash? the problem is, txAdmin automatically restarts the server after a crash, so mysql-async.log gets overwritten.
We're using Windows Server 2019, MariaDB 10.4 (have used 10.2, 10.3 and MySQL8 until you warned against it) and our (up-to-date) FXServer is using an old es_extended version (~1.1), with ~46 resources that use mysql-async. Here's the connection string:
set mysql_connection_string "server=localhost;port=3306;uid=USER;password=PASS.;database=DB;charset=utf8mb4_bin"
. I had the keepAlive CVAR for a while but I recently removed it, without perceiving any effect.I have a sample mysql-async.log but it doesn't contain the latest lines before a crash because of what I mentioned (the log gets overwritten after a restart). 67K queries in ~ 5h30m under fairly high load. Is there a way I could send it to you without making it public? as it contains some users' identifiable information.
Did you find any way to fix this?
I have not
I have not
Still no fix? I am now having the same issues, server hitches constantly until it crashes with no warning.
I've got the same problem for several months now
I've got the same problem for several months now
https://github.com/overextended/oxmysql use updated stuff then