You are viewing limited content. For full access, please sign in.

Question

Question

Error in scheduled report.

asked on October 26, 2022

Hello Folks!

Greetings!

We have scheduled a report at 05:00 AM everyday. And it behaves very weirdly as sometimes we don't get report in the mail. 

While checking "Event Viewer" I found the below mentioned error everyday at 05:18 AM (whenever report is missing). Looking forward to your response. Please help on this. 

 

EntityFrameworkInaccessibleErrorAdmin

------------------------------------------------------

Log Name:      Laserfiche-Forms-App/Admin
Source:        Laserfiche-Forms-App
Date:          10/20/2022 5:18:10 AM
Event ID:      10018
Task Category: EntityFrameworkInaccessibleErrorAdmin
Level:         Error
Keywords:      Session0,Session1,Session2,Session3
User:          SYSTEM
Computer:      DMS
Description:
Entity Framework returned the following error when trying to communicate with SQL Server: Maximum number of retries (30) exceeded while executing database operations with 'SqlAzureRetryExecutionStrategy'. See inner exception for the most recent failure.. [LFF18-EntityFrameworkInaccessible]

Details:
URL: 
Error: EntityFrameworkInaccessible
Date: 10/20/2022 5:18:10 AM (India Standard Time)
HTTP Status Code: 500
Business Process ID: 0
User: 
Business Process Name: 

Stack Trace:
Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException
Message: Entity Framework returned the following error when trying to communicate with SQL Server: Maximum number of retries (30) exceeded while executing database operations with 'SqlAzureRetryExecutionStrategy'. See inner exception for the most recent failure.. [LFF18-EntityFrameworkInaccessible]


Inner exception: System.Data.Entity.Infrastructure.RetryLimitExceededException
Message: Maximum number of retries (30) exceeded while executing database operations with 'SqlAzureRetryExecutionStrategy'. See inner exception for the most recent failure.
   at System.Data.Entity.Infrastructure.DbExecutionStrategy.Execute[TResult](Func`1 operation)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.<System.Collections.Generic.IEnumerable<T>.GetEnumerator>b__0()
   at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Laserfiche.Forms.SharedServices.QueryServices.DrilldownServices.GetBPInstanceDataByID[TSort,TThenSort](Nullable`1 bpId, Boolean includeArchivedInstance, Expression`1 sortExpression, SortDirection sortDirection, Expression`1 thenExpression, SortDirection thenDirection, Boolean useShowList, List`1 shownAttributesGroupingKeys, BPInstancesFilter filter, Int32 pageIndex, Int32 pageSize, Int32& totalItemCount, Dictionary`2& shownAttributeDict, Boolean forExport, String timeZone, List`1 eagerLoadingStrings)
   at CallSite.Target(Closure , CallSite , DrilldownServices , Nullable`1 , Boolean , Object , SortDirection , Object , SortDirection , Boolean , List`1 , BPInstancesFilter , Int32 , Int32 , Int32& , Dictionary`2& , Boolean , String , List`1 )
   at CallSite.Target(Closure , CallSite , DrilldownServices , Nullable`1 , Boolean , Object , SortDirection , Object , SortDirection , Boolean , List`1 , BPInstancesFilter , Int32 , Int32 , Int32& , Dictionary`2& , Boolean , String , List`1 )
   at Laserfiche.Forms.SharedServices.QueryServices.DrilldownServices.Get(Nullable`1 bpid, String filter, Int32 viewID, Int32 subViewId, List`1 columns, List`1 sorts, Int32 page, Int32 pageSize, Boolean includeWeekends, String search, String tz, Boolean isDownload, Boolean noAuthCheck)
   at Laserfiche.Forms.Routing.StaticReportGenerator.InsertSimpleReportToDb(LaserficheIdentity currentUser, Int32 viewId, Int32 subViewId, Int32 srId, String timeZone)
   at Laserfiche.Forms.Routing.StaticReportGenerator.InsertSrDataToDb(ServiceContext context, LaserficheIdentity currentUser, Int32 viewId, Int32 subViewId, Int32 srId, ChartConfig chartConfig, String timeZone)
   at Laserfiche.Forms.Routing.StaticReportGenerator.GenerateStaticReports()

Inner exception: System.Data.Entity.Core.EntityCommandExecutionException
Message: An error occurred while executing the command definition. See the inner exception for details.
   at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.<>c__DisplayClass7.<GetResults>b__5()
   at System.Data.Entity.Infrastructure.DbExecutionStrategy.Execute[TResult](Func`1 operation)

Inner exception: System.Data.SqlClient.SqlException
Message: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
   at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

Inner exception: System.ComponentModel.Win32Exception
Message: The wait operation timed out

Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
  <System>
    <Provider Name="Laserfiche-Forms-App" Guid="{98141ca4-660b-51c6-66b4-ec37f5b2fd87}" />
    <EventID>10018</EventID>
    <Version>0</Version>
    <Level>2</Level>
    <Task>55516</Task>
    <Opcode>0</Opcode>
    <Keywords>0x4000f00000000000</Keywords>
    <TimeCreated SystemTime="2022-10-19T23:48:10.134119000Z" />
    <EventRecordID>5776</EventRecordID>
    <Correlation />
    <Execution ProcessID="3436" ThreadID="7148" />
    <Channel>Laserfiche-Forms-App/Admin</Channel>
    <Computer>DMS</Computer>
    <Security UserID="S-1-5-18" />
  </System>
  <EventData>
    <Data Name="message">Entity Framework returned the following error when trying to communicate with SQL Server: Maximum number of retries (30) exceeded while executing database operations with 'SqlAzureRetryExecutionStrategy'. See inner exception for the most recent failure.. [LFF18-EntityFrameworkInaccessible]

Details:
URL: 
Error: EntityFrameworkInaccessible
Date: 10/20/2022 5:18:10 AM (India Standard Time)
HTTP Status Code: 500
Business Process ID: 0
User: 
Business Process Name: 

Stack Trace:
Caught exception: Laserfiche.Forms.CommonUtils.Exceptions.LFFormsException
Message: Entity Framework returned the following error when trying to communicate with SQL Server: Maximum number of retries (30) exceeded while executing database operations with 'SqlAzureRetryExecutionStrategy'. See inner exception for the most recent failure.. [LFF18-EntityFrameworkInaccessible]


Inner exception: System.Data.Entity.Infrastructure.RetryLimitExceededException
Message: Maximum number of retries (30) exceeded while executing database operations with 'SqlAzureRetryExecutionStrategy'. See inner exception for the most recent failure.
   at System.Data.Entity.Infrastructure.DbExecutionStrategy.Execute[TResult](Func`1 operation)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.&lt;System.Collections.Generic.IEnumerable&lt;T&gt;.GetEnumerator&gt;b__0()
   at System.Data.Entity.Internal.LazyEnumerator`1.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Laserfiche.Forms.SharedServices.QueryServices.DrilldownServices.GetBPInstanceDataByID[TSort,TThenSort](Nullable`1 bpId, Boolean includeArchivedInstance, Expression`1 sortExpression, SortDirection sortDirection, Expression`1 thenExpression, SortDirection thenDirection, Boolean useShowList, List`1 shownAttributesGroupingKeys, BPInstancesFilter filter, Int32 pageIndex, Int32 pageSize, Int32&amp; totalItemCount, Dictionary`2&amp; shownAttributeDict, Boolean forExport, String timeZone, List`1 eagerLoadingStrings)
   at CallSite.Target(Closure , CallSite , DrilldownServices , Nullable`1 , Boolean , Object , SortDirection , Object , SortDirection , Boolean , List`1 , BPInstancesFilter , Int32 , Int32 , Int32&amp; , Dictionary`2&amp; , Boolean , String , List`1 )
   at CallSite.Target(Closure , CallSite , DrilldownServices , Nullable`1 , Boolean , Object , SortDirection , Object , SortDirection , Boolean , List`1 , BPInstancesFilter , Int32 , Int32 , Int32&amp; , Dictionary`2&amp; , Boolean , String , List`1 )
   at Laserfiche.Forms.SharedServices.QueryServices.DrilldownServices.Get(Nullable`1 bpid, String filter, Int32 viewID, Int32 subViewId, List`1 columns, List`1 sorts, Int32 page, Int32 pageSize, Boolean includeWeekends, String search, String tz, Boolean isDownload, Boolean noAuthCheck)
   at Laserfiche.Forms.Routing.StaticReportGenerator.InsertSimpleReportToDb(LaserficheIdentity currentUser, Int32 viewId, Int32 subViewId, Int32 srId, String timeZone)
   at Laserfiche.Forms.Routing.StaticReportGenerator.InsertSrDataToDb(ServiceContext context, LaserficheIdentity currentUser, Int32 viewId, Int32 subViewId, Int32 srId, ChartConfig chartConfig, String timeZone)
   at Laserfiche.Forms.Routing.StaticReportGenerator.GenerateStaticReports()

Inner exception: System.Data.Entity.Core.EntityCommandExecutionException
Message: An error occurred while executing the command definition. See the inner exception for details.
   at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)
   at System.Data.Entity.Core.Objects.Internal.ObjectQueryExecutionPlan.Execute[TResultType](ObjectContext context, ObjectParameterCollection parameterValues)
   at System.Data.Entity.Core.Objects.ObjectContext.ExecuteInTransaction[T](Func`1 func, IDbExecutionStrategy executionStrategy, Boolean startLocalTransaction, Boolean releaseConnectionOnSuccess)
   at System.Data.Entity.Core.Objects.ObjectQuery`1.&lt;&gt;c__DisplayClass7.&lt;GetResults&gt;b__5()
   at System.Data.Entity.Infrastructure.DbExecutionStrategy.Execute[TResult](Func`1 operation)

Inner exception: System.Data.SqlClient.SqlException
Message: Execution Timeout Expired.  The timeout period elapsed prior to completion of the operation or the server is not responding.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean&amp; dataReady)
   at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
   at System.Data.SqlClient.SqlDataReader.get_MetaData()
   at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
   at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task&amp; task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task&amp; task, Boolean&amp; usedCache, Boolean asyncWrite, Boolean inRetry)
   at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
   at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
   at System.Data.Entity.Infrastructure.Interception.InternalDispatcher`1.Dispatch[TTarget,TInterceptionContext,TResult](TTarget target, Func`3 operation, TInterceptionContext interceptionContext, Action`3 executing, Action`3 executed)
   at System.Data.Entity.Infrastructure.Interception.DbCommandDispatcher.Reader(DbCommand command, DbCommandInterceptionContext interceptionContext)
   at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.ExecuteStoreCommands(EntityCommand entityCommand, CommandBehavior behavior)

Inner exception: System.ComponentModel.Win32Exception
Message: The wait operation timed out


</Data>
  </EventData>
</Event>

--------------------------------------------------

0 0

Replies

replied on October 27, 2022

What version of Forms are you using?

0 0
replied on October 27, 2022

Form version 10

0 0
replied on October 27, 2022

We have improved the performance for generating report snapshots in version 11. You issue may already be fixed. If you can open a support case and provide us you Forms database backup, we can check it for you with the latest released version to confirm whether it has been fixed or not.

Also you can check whether increase the SQLServerCommandTimeout can solve it.

You can change SQLServerCommandTimeout from C:\Program Files\Laserfiche\Laserfiche Forms\Forms\bin\RoutingEngineServiceHost.exe.config

Change to 120 (stands for 2 minutes) for example, and then you need to restart Laserfiche Forms Routing Service to make it take effect. Be sure to restart the Laserfiche Forms Routing Service when the CPU of it is 0 from Task Manager. 

0 0
replied on October 29, 2022

I did all the suggested changes.

- changed SQL server command timeout from 30 to 120.

- restarted Laserfiche Forms Routing service 

And then restarted the server also. 

Now when I'm trying to schedule report through scheduler getting below mentioned error. Please help:

Forms cannot connect to the Laserfiche Routing Service because the service is not running. [LFF501-RoutingEngineDown]

Capture.PNG
Capture.PNG (16.71 KB)
0 0
replied on October 29, 2022

Checked routing service also. Its running. 

0 0
replied on November 4, 2022

Sorry for the late response.

Although the Windows service is running, but there may be internal errors so some internal services are not running.

Can you save the report schedule again and check whether there is still error. And it the error still persists, can you get the full error message as you initial posted from the event viewer for the Forms server?

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.