I keep getting this error Error when starting my server
Error running system event handling function for resource mysql-async: citizen:/scripting/lua/scheduler.lua:41: Failed to execute thread: citizen:/scripting/lua/scheduler.lua:663: An error happened while calling export mysql_configure of resource mysql-async (citizen:/scripting/lua/MessagePack.lua:830: missing bytes), see above for details
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:663: in method ‘mysql_configure’
lib/init.lua:3: in upvalue ‘handler’
citizen:/scripting/lua/scheduler.lua:175: in function citizen:/scripting/lua/scheduler.lua:174
stack traceback:
[C]: in function ‘error’
citizen:/scripting/lua/scheduler.lua:41: in field ‘CreateThreadNow’
citizen:/scripting/lua/scheduler.lua:174: in function citizen:/scripting/lua/scheduler.lua:138
hitch warning: frame time of 613 milliseconds
Since Brouznouf decided to (at least) temporarily not further develop this resource, he came to me with an agreement, that I would maintain it a bit.
Update to 2.0.3
Updated MySqlConnector to 0.28.2 (the last version to actually work with mysql-async) Thanks to @IceHax testing it once.
Possible Issues I ran into: When replacing the files some database queries failed. You need to restart the server once more to make it work seamlessly.
Updated MySqlConnector to a Custom 0.36.1 Release (Differences will be on my MySqlConnector branch once I reach the up to date version 0.37.0). This should improve performance, reduce CPU load, and contains tons of bugfixes.
I am using ESX base with this update…
Once everything has been commented out to open the script 1 by 1 on the server.
I get hitch warning once mysql-async is uncommented.
I will be looking into it this weekend. I might have overlooked some performance blockers [as I only checked for bulk performance which did not change] in the MySqlConnector lib.
And add the requested Transactions, but definately not before Saturday.
Also mysql-async still runs on the server thread and will always run on the server thread (as I have my TaskScheduler on AGPL, and I will not change the License of mysql-async from MIT). Sync-calls can cause hitches. Also when you start up it can hitch when loading the dlls, depending on the CPU of your server.
@rhys19 I think Zap-hosting itself provides support for installing resources, I bet they can help you out with this. Since this is a configuration error and not a resource specific error.
Updated MySqlConnector to a Custom 0.37.1 Release. I am not sure if I lost performance on Async queries somewhere along the way from 0.26/2.0.2; can someone compare?
Added Threaded operations. They work the same way as sync calls, but are slower as they are not executed on the server thread. You call them by using MySQL.Threaded.execute/insert/fetchAll/fetchScalar. If you are experiencing timeouts (replace some async queries with them). If you are experiencing hitches, replace some sync queries with them.
Added Transactions; they do not have a Threaded option yet.
I did not throughly test both features (as I just spent very little time testing and modifying this at all). If you are experiencing bugs, please report them in this topic.
I tested the bulk performance throughly which is about the same (I think i got some 5% - 15% improvements or so there something minor). The sync performance is the same too.
The newer MySqlConnector fixes quite some bugs. Like CPU usage volatility, and makes transactions actually usable; because it would memory leak on failed transactions. Makes Amazon Aurora usable, handles timeouts better, etc. There is like half a year of development in it. Read the patchnotes
I am actually prepared to go through the MySqlConnector and check to how to increase the performance, should it be an issue.
But if no one complains with evidence, I assume everything works fine.
This is not my current main project and I update if I see a reason to it.
Are there any tutorials on how to read and write to and from a database with this and lua?
I don’t mind reading and learning at all, I’m not strong on the MySQL side of things.
I tried searching on the forum but strangely enough, I could not find anything on how to use them…
I’m looking for a way to write and read a character to and from a database. If there’s a sample of that or a tutorial on how I can save and load a player that would be fantastic.
Hello! Is it possibel (in that case how?) to make some sort of command that works from the console that saves all the players in-game? So they dont get a rollback when they dont have time to dissconect in time
Hi guys, i have a random problem…
My server makes a random timeout for all players and the console return this error:
[ 43187828] [ERROR] [MySQL] An critical error happens on MySQL for query "SELECT * FROM owned_vehicles {=}": MySqlSession is not connected. at MySql.Data.Serialization.MySqlSession.VerifyConnected () [0x00052] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] at MySql.Data.Serialization.MySqlSession.ReceiveReplyAsync (MySql.Data.Protocol.Serialization.IOBehavior ioBehavior, System.Threading.CancellationToken cancellationToken) [0x00000] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] --- End of stack trace from previous location where exception was thrown ---
[ 43187828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at MySql.Data.Serialization.MySqlSession.TryAsyncContinuation (System.Threading.Tasks.Task`1[TResult] task) [0x00016] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] at (wrapper delegate-invoke) System.Func`2[System.Threading.Tasks.Task`1[System.ArraySegment`1[System.Byte]],MySql.Data.Serialization.PayloadData]:invoke_TResult_T (System.Threading.Tasks.Task`1<System.ArraySegment`1<byte>>)
[ 43187828] at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Threading.Tasks.Task.Execute () [0x00010] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] --- End of stack trace from previous location where exception was thrown ---
[ 43187828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at MySql.Data.MySqlClient.Results.ResultSet+<>c__DisplayClass8_0+<<ScanRowAsync>g__ScanRowAsyncAwaited0>d.MoveNext () [0x00075] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] --- End of stack trace from previous location where exception was thrown ---
[ 43187828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1+ConfiguredValueTaskAwaiter[TResult].GetResult () [0x0001e] in <4ac30274d31c4b8099694c24336fcb22>:0
[ 43187828] at MySql.Data.MySqlClient.Results.ResultSet+<ReadAsync>d__6.MoveNext () [0x000cb] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] --- End of stack trace from previous location where exception was thrown ---
[ 43187828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at MySql.Data.MySqlClient.Results.ResultSet+<ReadEntireAsync>d__3.MoveNext () [0x00079] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] --- End of stack trace from previous location where exception was thrown ---
[ 43187828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.ConfiguredTaskAwaitable+ConfiguredTaskAwaiter.GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at MySql.Data.MySqlClient.MySqlDataReader+<NextResultAsync>d__5.MoveNext () [0x0009e] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] --- End of stack trace from previous location where exception was thrown ---
[ 43187828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43187828] at MySql.Data.MySqlClient.MySqlDataReader.NextResult () [0x00012] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] at MySql.Data.MySqlClient.MySqlDataReader.DoClose () [0x00013] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] at MySql.Data.MySqlClient.MySqlDataReader.Close () [0x00000] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] at System.Data.Common.DbDataReader.Dispose (System.Boolean disposing) [0x00003] in <c660f5a12cac430aa34fafb29a22e588>:0
[ 43187828] at MySql.Data.MySqlClient.MySqlDataReader.Dispose (System.Boolean disposing) [0x0000b] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] at System.Data.Common.DbDataReader.Dispose () [0x00000] in <c660f5a12cac430aa34fafb29a22e588>:0
[ 43187828] at (wrapper remoting-invoke-with-check) System.Data.Common.DbDataReader:Dispose ()
[ 43187828] at MySql.Data.MySqlClient.MySqlConnection.CloseDatabase () [0x00011] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] at MySql.Data.MySqlClient.MySqlConnection.DoClose () [0x00018] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] at MySql.Data.MySqlClient.MySqlConnection.Dispose (System.Boolean disposing) [0x00003] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43187828] at System.ComponentModel.Component.Dispose () [0x00000] in <7d13762c3f3046279fc4d30c52f6f595>:0
[ 43187828] at MySQLAsync.Operation`1+<ExecuteAsync>d__3[TResult].MoveNext () [0x0022f] in <6b79789832b34a31961dbb39358e1b3f>:0
[ 43188828] Exception thrown by a task: System.AggregateException: One or more errors occurred. ---> System.IO.EndOfStreamException: Attempted to read past the end of the stream.
[ 43188828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at MySql.Data.ValueTaskExtensions+<>c__DisplayClass0_0`2[T,TResult].<ContinueWith>b__0 (System.Threading.Tasks.Task`1[TResult] task) [0x0000c] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43188828] at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Threading.Tasks.Task.Execute () [0x00010] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] --- End of stack trace from previous location where exception was thrown ---
[ 43188828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at MySql.Data.Serialization.MySqlSession.TryAsyncContinuation (System.Threading.Tasks.Task`1[TResult] task) [0x00016] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43188828] at (wrapper delegate-invoke) System.Func`2[System.Threading.Tasks.Task`1[System.ArraySegment`1[System.Byte]],MySql.Data.Serialization.PayloadData]:invoke_TResult_T (System.Threading.Tasks.Task`1<System.ArraySegment`1<byte>>)
[ 43188828] at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Threading.Tasks.Task.Execute () [0x00010] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] --- End of stack trace from previous location where exception was thrown ---
[ 43188828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at MySql.Data.MySqlClient.Results.ResultSet+<>c__DisplayClass8_0+<<ScanRowAsync>g__ScanRowAsyncAwaited0>d.MoveNext () [0x00075] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43188828] --- End of stack trace from previous location where exception was thrown ---
[ 43188828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1+ConfiguredValueTaskAwaiter[TResult].GetResult () [0x0001e] in <4ac30274d31c4b8099694c24336fcb22>:0
[ 43188828] at MySql.Data.MySqlClient.Results.ResultSet+<ReadAsync>d__6.MoveNext () [0x000cb] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43188828] --- End of stack trace from previous location where exception was thrown ---
[ 43188828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at MySQLAsync.FetchAll+<ReaderAsync>d__2.MoveNext () [0x0016c] in <6b79789832b34a31961dbb39358e1b3f>:0
[ 43188828] --- End of inner exception stack trace ---
[ 43188828] ---> (Inner Exception #0) System.IO.EndOfStreamException: Attempted to read past the end of the stream.
[ 43188828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at MySql.Data.ValueTaskExtensions+<>c__DisplayClass0_0`2[T,TResult].<ContinueWith>b__0 (System.Threading.Tasks.Task`1[TResult] task) [0x0000c] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43188828] at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Threading.Tasks.Task.Execute () [0x00010] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] --- End of stack trace from previous location where exception was thrown ---
[ 43188828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at MySql.Data.Serialization.MySqlSession.TryAsyncContinuation (System.Threading.Tasks.Task`1[TResult] task) [0x00016] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43188828] at (wrapper delegate-invoke) System.Func`2[System.Threading.Tasks.Task`1[System.ArraySegment`1[System.Byte]],MySql.Data.Serialization.PayloadData]:invoke_TResult_T (System.Threading.Tasks.Task`1<System.ArraySegment`1<byte>>)
[ 43188828] at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2[TAntecedentResult,TResult].InnerInvoke () [0x00024] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Threading.Tasks.Task.Execute () [0x00010] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] --- End of stack trace from previous location where exception was thrown ---
[ 43188828] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188828] at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1+ConfiguredTaskAwaiter[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188844] at MySql.Data.MySqlClient.Results.ResultSet+<>c__DisplayClass8_0+<<ScanRowAsync>g__ScanRowAsyncAwaited0>d.MoveNext () [0x00075] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43188844] --- End of stack trace from previous location where exception was thrown ---
[ 43188844] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188844] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188844] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188844] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188844] at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188844] at System.Runtime.CompilerServices.ConfiguredValueTaskAwaitable`1+ConfiguredValueTaskAwaiter[TResult].GetResult () [0x0001e] in <4ac30274d31c4b8099694c24336fcb22>:0
[ 43188844] at MySql.Data.MySqlClient.Results.ResultSet+<ReadAsync>d__6.MoveNext () [0x000cb] in <5d2e43c2aa6f4da0bb43a6a12077ad51>:0
[ 43188844] --- End of stack trace from previous location where exception was thrown ---
[ 43188844] at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () [0x0000c] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188844] at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Threading.Tasks.Task task) [0x0003e] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188844] at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Threading.Tasks.Task task) [0x00028] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188844] at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd (System.Threading.Tasks.Task task) [0x00008] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188844] at System.Runtime.CompilerServices.TaskAwaiter`1[TResult].GetResult () [0x00000] in <0123fd5b1a1040fe9d70a7e0d4b28acb>:0
[ 43188844] at MySQLAsync.FetchAll+<ReaderAsync>d__2.MoveNext () [0x0016c] in <6b79789832b34a31961dbb39358e1b3f>:0 <---
Its very random!
Sometimes its get days without falling, can anyone help me please? Thanks.
I think this did not occur on my test; as I believe this happened on the for connection pools with a similar error, but in the last version some errors got rewritten. Maybe it is the same.
In these that depends highly on how many call you do how. If you send a lot of MySQL Async queries this might happen, e.g. more than 150 per second.
If it is your code, you should use some Threaded calls (in the newer version) in between to soften the load for the Async part. Which should be with sane Threaded usage handle up to maybe 220qps on a bad system configuration.
If your usage is any higher, you might need to switch for GHMattiMySQL. Which really starts to shine on a server with 4 or more cores.
edit: If you got less than four cores, you are in any case usually better off with mysql-async.