MySqlCommand memory leak 返回

SqlSugar 老数据
2 1722

如下图所示,在并发线程数为100,循环100次时,MySqlCommand 不释放,并且对应MySqlConnection 也不释放。对应Mysql数据库最大连接数为1000.

对应代码在:
SqlSugar.AdoProvider.GetDataReaderAsync ,中的 sqlCommand 不能及时释放。有什么好办法没有。在较慢得访问频率下,资源有释放。


image

热忱回答2

  • karqical karqical VIP0
    2020/9/23

    问题已经找到。


    [7 Feb 16:07] Christine Cole

    Posted by developer:
     
    Fixed as of the upcoming MySQL Connector/NET 8.0.20 release, and here's the proposed changelog entry from the documentation team:
    
    Access to the MySqlDataReader object was restricted when the parent MySqlCommand
    object was closed. This fix modifies MySqlCommand.Dispose() to no longer
    call the ResetReader method.
    
    Thank you for the bug report.


    0 回复
  • DR需要手动释放或者USING

    0 回复