1

Exceptions/SyncAnalyzer interrupted

From Resco's Wiki
Jump to navigation Jump to search

SyncAnalyzer interruptions are exceptions that can appear in the sync log of Resco mobile apps.

About this exception

SyncAnalyzer is an optional step in the synchronization process of Resco mobile apps. It answers the question, for each entity, is it better to download all records changed since the last synchronization or to download all records that match SyncFilter at this instant?

"SyncAnalyzer interrupted" exceptions are just warnings; they don't interrupt the sync process. The per-entity analysis of the optimal sync strategy failed and synchronization continues with the default sync behavior.

Handling

  • This exception is not fatal. Sync should continue; it might be somewhat slower.
  • Sometimes, this could be a temporary server problem; the next sync should work without errors.
  • If the problem persists and negatively affects your sync performance, look for detailed error messages and/or error codes in the log. Maybe you can find a solution online.

Example: Deadlock

<EXCEPTION>15:17:31.142: Warning: SyncAnalyzer interrupted due to this error (Sync goes on, remaining entities use IncSync):
Net.RescoSoapException: Server-Fehler: Transaction (Process ID 73) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
<soap>
  Code=500| ErrorCode=-2146232060| Reason=SqlException| SupportId=23864054-005a-40c3-b438-948b057cb148
</soap>
at WebServiceBase.XmlResponse..ctor()
at Xrm.XrmService.BeginInvoke(String action, Object context, Action<Xml.XmlWriter,Object> writeXml, Xml.XmlReader& reader)
at Salesforce.SalesforceService.<ExecuteFetch>d__64.MoveNext()
at SyncEngine.SyncAnalyzer.Job.GetAggregateCount(Data.WebService.ICrmService service, Data.FetchXml.Fetch fetch, Data.MetaProperty prop, String& errorMessage)
</EXCEPTION>

Error analysis:

  • SqlException indicates a server database problem.
  • "Transaction was deadlocked on lock resources with another process...": The dreaded deadlock. Several processes wait on each other in a circle (indefinitely).
  • "... and has been chosen as the deadlock victim": One of those processes has to give up. The server chose our fetch and terminated our request by force.
  • "Rerun the transaction" means that the problem should not happen when we repeat the same request.

A server problem. Database deadlock, race conditions with another process. Our fetch was terminated by force in order to enable the proper functioning of other competing processes.

This is a random error that cannot be influenced by Resco. The next sync should not have this problem.

Example: unexpected server error

<EXCEPTION>11:49:46.353: Warning: SyncAnalyzer interrupted due to this error (Sync goes on, remaining entities use IncSync):
Net.RescoSoapException: Server Error: An unexpected error occurred.
<soap>Code.Value=s:Sender| Detail.OrganizationServiceFault.ActivityId=2f4aa413-5e7e-42d1-bafa-ae3bb65bfe3d| 
  Detail.OrganizationServiceFault.ErrorCode=-2147220970|
  Detail.OrganizationServiceFault.Timestamp=2020-07-21T18:49:45.4041391Z| 
  Detail.OrganizationServiceFault.ExceptionRetriable=false| 
  Detail.OrganizationServiceFault.InnerFault.Message=NullReferenceException: Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #C23D2586
</soap>
  at WebServiceBase.XmlResponse..ctor()
  at Crm2011.CrmService2011+<ExecuteFetch>d__59.MoveNext ()
  at Linq.Enumerable.FirstOrDefault[TSource] (Collections.Generic.IEnumerable`1[T] source)
  at SyncEngine+SyncAnalyzer+Job.GetAggregateCount (ICrmService service, MobileCrm.Data.FetchXml.Fetch fetch, MobileCrm.Data.MetaProperty prop, String& errorMessage)
</EXCEPTION>
  • NullReferenceException in <soap> details points to a programming bug (using an uninitialized pointer).
  • Looks like a server error; Resco cannot avoid the problem.





Was this information helpful? How can we improve?