MySql.Data.MySqlClient.MySqlProtocolException:“Packet received out-of-order. Expected 1; got 2.”


dotnet core 3.1 webapi efcore

maridb 10



await _context.SaveChangesAsync();



It is not permitted to have multiple in-flight async operations on the same connection at the same time; you do have to await any existing operation before starting a new one.
However, you should also get a more helpful exception message (better than Packet received out-of-order) that helps you understand the problem and fix it. So if you are able to get a repro or a code sample that shows the problem, that would be good as it could help me identify where there is a missing check (for this invalid behaviour) in the code.
但是,您还应该获得一条更有用的异常消息(比Packet received out-of-order这有助于你理解并解决问题。因此,如果您能够获得显示问题的repro或代码示例,那将是很好的,因为它可以帮助我识别代码中缺少检查(这种无效行为)的位置。

posted on 2020-01-06 16:54  VincentZhu  阅读(1185)  评论(0编辑  收藏  举报