产品版本: 7.0.01260.0 复杂或长时间查询的缓存数据集使用运行计划报异常
本帖最后由 RickyJen 于 2024-7-16 08:46 编辑问题说明:
在wyn中创建了十多个的“缓存数据集”,这些数据集某几个查询所需时长比较长,由于数据量比较大,有的可能时长超过十分钟。我对这些“缓存数据集”均配置了“运行计划”和邮件通知,每天凌晨1:30分执行一次。发现每天都会有执行不成功的缓存数据集并给我发送了通知,并且每次出问题的数据集都不一样,似乎是随机的。
尝试过的办法:
我尝试使用数据源的“连接字符串”配置“超时时间”如下图所示,是否是超时没有生效?这里的超时的单位是“秒”还是“毫秒”?
运行计划邮件发送的报错信息:
文件类型:数据集;
执行时间:2024/7/16 1:31:21
失败信息:1) [执行错误] 运行时错误。
GrapeCity.Enterprise.DataService.DataWarehouse.Facade.DataWarehouseException: Failed to create data file.
---> System.IO.IOException: Unable to write data to the transport connection: 远程主机强迫关闭了一个现有的连接。.
---> System.Net.Sockets.SocketException (10054): 远程主机强迫关闭了一个现有的连接。
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 count)
--- End of inner exception stack trace ---
at System.Net.Sockets.NetworkStream.Write(Byte[] buffer, Int32 offset, Int32 count)
at OracleInternal.Network.Packet.Send()
at OracleInternal.Network.OracleCommunication.Break()
at OracleInternal.TTC.TTCExecuteSql.ReceiveExecuteResponse(Accessor[]& defineAccessors, Accessor[] bindAccessors, Boolean bHasReturningParams, SQLMetaData& sqlMetaData, SqlStatementType statementType, Int64 noOfRowsFetchedLastTime, Int32 noOfRowsToFetch, Int32& noOfRowsFetched, Int64& queryId, Int32 longFetchSize, Int64 clientInitialLOBFetchSize, Int64 initialLOBFetchSize, Int64 initialJSONFetchSize, Int64[] scnFromExecution, Boolean bAllInputBinds, Int32 arrayBindCount, DataUnmarshaller& dataUnmarshaller, MarshalBindParameterValueHelper& marshalBindParamsHelper, Int64[]& rowsAffectedByArrayBind, Boolean bDefineDone, Boolean& bMoreThanOneRowAffectedByDmlWithRetClause, List`1& implicitRSList, Boolean bLOBArrayFetchRequired)
at OracleInternal.ServiceObjects.OracleDataReaderImpl.FetchMoreRows(Int32 noOfRowsToFetch, Boolean fillReader, Boolean returnPSTypes)
at Oracle.ManagedDataAccess.Client.OracleDataReader.Read()
at GrapeCity.Enterprise.Data.DataSource.Common.SqlExecutor.SourceTable.<>c__DisplayClass25_0.<<LoadFromReaderImpl>g__IterateOnly|1>d.MoveNext()
at System.Linq.Enumerable.SelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.SelectIterator(IEnumerable`1 source, Func`3 selector)+MoveNext()
at GrapeCity.Enterprise.DataService.DataWarehouse.DuckDB.EnumerableExt.NextPartition(IEnumerator`1 enumerator, Int32 blockSize)+MoveNext()
at GrapeCity.Enterprise.DataService.DataWarehouse.DuckDB.ParquetDuckDbDataWarehouse.CreateNewDataFileAsync(String filePath, ISourceData sourceData)
at GrapeCity.Enterprise.DataService.DataWarehouse.DuckDB.ParquetDuckDbDataWarehouse.CreateNewDataFileAsync(String filePath, ISourceData sourceData)
at GrapeCity.Enterprise.DataService.DataWarehouse.DuckDB.ParquetDuckDbDataWarehouse.CreateAsync(String tableName, ISourceData sourceData, UInt64 dataVersion)
--- End of inner exception stack trace ---
at GrapeCity.Enterprise.DataService.DataWarehouse.DuckDB.ParquetDuckDbDataWarehouse.CreateAsync(String tableName, ISourceData sourceData, UInt64 dataVersion)
at GrapeCity.Enterprise.Data.CacheWork.Processor.CommonCreateFullRefresh.CreateCacheWithDataAsync(CacheWorkReport report, ICacheWorkPayload payload, ISourceData sourceData)
链接字符串的超时时间的单位是秒,出现这个问题的原因可能是缓存数据集同时在一个时间节点开始刷新,造成数据库查询压力过大导致超时。可以在设置运行计划的时候将时间错开。
页:
[1]