Page 1 of 1

Cache Report render issue

Posted: Wed Mar 13, 2024 1:16 pm
by SunilKumar
I have implemented the custom cache for report.
https://www.stimulsoft.com/en/documenta ... eports.htm
The report file is saved in server
stiNetCoreViewer_9ba07aa7ac684fc29156e2368a011c25_template &
stiNetCoreViewer_9ba07aa7ac684fc29156e2368a011c25

When I render a fresh report (no cache directly from data source) it rendering the report without any issue.
But when within few seconds i try to generate the same report with cache (the logic work this after first time is pick the report from cache)
Sometime i get "Timeout response from the server"
and sometime getting this

Code: Select all

System.NullReferenceException: Object reference not set to an instance of an object. at MySql.Data.MySqlClient.NativeDriver.GetResultAsync(Int32 affectedRow, Int64 insertedId, Boolean execAsync) at MySql.Data.MySqlClient.Driver.GetResultAsync(Int32 statementId, Int32 affectedRows, Int64 insertedId, Boolean execAsync) at MySql.Data.MySqlClient.Driver.NextResultAsync(Int32 statementId, Boolean force, Boolean execAsync) at MySql.Data.MySqlClient.MySqlDataReader.NextResultAsync(Boolean execAsync, CancellationToken cancellationToken) at MySql.Data.MySqlClient.MySqlDataReader.CloseAsync(Boolean execAsync) at MySql.Data.MySqlClient.MySqlDataReader.DisposeAsync(Boolean execAsync) at MySql.Data.MySqlClient.MySqlDataReader.Dispose(Boolean disposing) at System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) at System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) at Stimulsoft.Report.Dictionary.StiDataAdapterHelper.Fill(StiDictionary dictionary, DbDataAdapter dataAdapter, DataTable dataTable, Boolean schemaOnly) at Stimulsoft.Report.Dictionary.StiSqlSource.RetrieveData(Boolean schemaOnly) at Stimulsoft.Report.Dictionary.StiDataLeader.RetrieveData(StiSqlSource dataSource, Boolean schemaOnly) at Stimulsoft.Report.Dictionary.StiSqlAdapterService.ConnectDataSourceToData(StiDictionary dictionary, StiDataSource dataSource, Boolean loadData) at Stimulsoft.Report.Dictionary.StiDataLeader.ConnectDataSourceToData(StiDataAdapterService adapter, StiDictionary dictionary, StiDataSource dataSource, Boolean loadData) at Stimulsoft.Report.Dictionary.StiDataSource.Connect(StiDataCollection datas, Boolean loadData, Boolean invokeEvents) at Stimulsoft.Report.Dictionary.StiDataLeader.Connect(StiDataSource dataSource, StiDataCollection datas, Boolean loadData) at Stimulsoft.Report.Dictionary.StiDataSourcesCollection.Connect(StiDataCollection datas, Boolean loadData) at Stimulsoft.Report.Dictionary.StiDataSourcesCollection.Connect(Boolean loadData) at Stimulsoft.Report.Dictionary.StiDictionary.Connect(Boolean loadData, List`1 dataSources) at Stimulsoft.Report.Engine.StiRenderProviderV2.ConnectToData(StiReport report, Boolean isConnectToDataV2) at Stimulsoft.Report.Engine.StiRenderProviderV2.Render(StiReport report, StiRenderState state) at Stimulsoft.Report.Engine.StiReportV2Builder.RenderSingleReport(StiReport masterReport, StiRenderState renderState) at Stimulsoft.Report.StiReport.RenderReport(StiRenderState renderState) at Stimulsoft.Report.StiReport.Render(StiRenderState renderState, StiGuiMode guiMode) at Stimulsoft.Report.StiReport.Render(StiRenderState renderState) at Stimulsoft.Report.StiReport.Render(Boolean showProgress, Int32 fromPage, Int32 toPage) at Stimulsoft.Report.StiReport.Render(Boolean showProgress) at Stimulsoft.Report.StiReport.Render()   

And some time

Code: Select all

MySql.Data.MySqlClient.MySqlException (0x80004005): Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding. ---> System.TimeoutException: 
it looks like that the cached report is also trying to hit database.

As When i added the a debug point at below method

Code: Select all

public override StiReport GetReport(string guid)

{

string path = System.IO.Path.Combine(System.Web.HttpContext.Current.Server.MapPath("~/"), "CacheFiles", guid);

if (System.IO.File.Exists(path))

{

StiReport report = new StiReport();

string packedReport = System.IO.File.ReadAllText(path);

if (guid.EndsWith("template")) report.LoadPackedReportFromString(packedReport);

else report.LoadPackedDocumentFromString(packedReport);

 

return report;

}

return null;

 

//return base.GetReport(guid);

}

 
The report already render on with all the content.

Can i get a life cycle document of the StimulSoft core.
Or any other doc that can help me so solve the above error and load data from cache completely

Re: Cache Report render issue

Posted: Thu Mar 14, 2024 10:55 am
by Lech Kulikowski
Hello,

We require more time to investigate the issue thoroughly. Rest assured, we will keep you informed about the outcome as soon as possible.

Thank you.
#14027

Re: Cache Report render issue

Posted: Fri Mar 15, 2024 5:53 am
by SunilKumar
Okay,
Thanks

Re: Cache Report render issue

Posted: Fri Mar 15, 2024 10:47 pm
by Lech Kulikowski
Hello,

Could you check for test any 2023.x version and let us know about the result?

Thank you.