When an incomplete message is received from the server, MySqlConnector throws an exception with the message $"Expected to read {payloadLength:d} payload bytes but only received {payloadBytes.Count:d}.":
The message doesn't clearly identify the cause of the issue, which has historically been the server closing the connection, not a bug in this library.
Change the message to something more generic such as "An incomplete response was received from the server" and log the extra details.
When an incomplete message is received from the server, MySqlConnector throws an exception with the message
$"Expected to read {payloadLength:d} payload bytes but only received {payloadBytes.Count:d}.":Expected to read 7907 payload bytes but only received 636. #1113The message doesn't clearly identify the cause of the issue, which has historically been the server closing the connection, not a bug in this library.
Change the message to something more generic such as "An incomplete response was received from the server" and log the extra details.