本帖最后由 喵星来的喵 于 2023-5-10 17:04 编辑
我这边用的数据库是外联的MySQL,在服务端API用DataAccess.GetTableData()访问数据时,偶尔会有以下报错,帮忙看看怎么解决:
EventMgt_HZG_API has failed to send notification:{ "ClassName": "System.InvalidOperationException", "Message": "This MySqlConnection is already in use. See https://fl.vu/mysql-conn-reuse", "Data": null, "InnerException": null, "HelpURL": null, "StackTraceString": " at MySqlConnector.Core.ServerSession.StartQuerying(ICancellableCommand command) in /_/src/MySqlConnector/Core/ServerSession.cs:line 297 at MySqlConnector.Core.CommandExecutor.ExecuteReaderAsync(IReadOnlyList`1 commands, ICommandPayloadCreator payloadCreator, CommandBehavior behavior, Activity activity, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/Core/CommandExecutor.cs:line 50 at MySqlConnector.MySqlCommand.ExecuteReaderAsync(CommandBehavior behavior, IOBehavior ioBehavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 331 at MySqlConnector.MySqlCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken) in /_/src/MySqlConnector/MySqlCommand.cs:line 323 at Forguncy.DataSourceBase.FillTableAsync(String commandText, IEnumerable`1 parameters) at ForguncyDataAccess.DataAccess.a(String A_0, String A_1, DataBaseType A_2, DbParameter[] A_3) at ForguncyDataAccess.DataAccess.SelectAsync(List`1 columnBindingInfos, ISqlCondition selectCondition, TopSqlConditionBase topCondition, String tableName, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean useGroupBy) at Forguncy.Server2.ForguncyServerDataAccess.SelectAsync(List`1 columnBindingInfos, ISqlCondition selectCondition, TopSqlConditionBase topCondition, String tableName, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean useGroupBy) at ForguncyDataAccess.DataAccess.GetDetailDataTableAsync(List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, OrderBySqlCondition orderByCondition, List`1 primaryKeys, OffsetSqlCondition offsetCondition, Boolean distinct) at ForguncyDataAccess.DataAccess.GetDataTableAsync(List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, List`1 primaryKeys, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean distinct) at Forguncy.Server2.ForguncyServerDataAccess.GetDataTableAsync(List`1 columnBindingInfos, ISqlCondition sqlCondition, TopSqlConditionBase topCondition, List`1 primaryKeys, OrderBySqlCondition orderByCondition, OffsetSqlCondition offsetCondition, Boolean distinct) at ForguncyOData.ODataMethods.Query(DataAccess access, String uri, Boolean throwError)", "RemoteStackTraceString": null, "RemoteStackIndex": 0, "ExceptionMethod": null, "HResult": -2146233079, "Source": "MySqlConnector", "WatsonBuckets": null}CurrentMethodName: OData/Query/GetTableData
at Forguncy.KatanaMiddleware.l.GetTableData(String odataParser) at EventMgt_HZG_API.EventMgt.EventnotificationViaXDon()
|