none
The remote endpoint no longer recognizes this sequence. This is most likely due to an abort on the remote endpoint. The value of wsrm:Identifier is not a known Sequence identifier. The reliable session was faulted. RRS feed

  • Question

  • I am using sync framework 2.1, sqlsyncprovider, batching is enabled.

    Following are the error messages I am seeing in my trace file when using batching: 

    Inactivitytimemout,recievetimeout,sendtimeout,message size in web.config file are set to high values.

    The remote endpoint no longer recognizes this sequence. This is most likely due to an abort on the remote endpoint. The value of wsrm:Identifier is not a known Sequence identifier. The reliable session was faulted.

    There was no endpoint listening at http://10.29.7.171/Service1.svc that could accept the message. This is often caused by an incorrect address or SOAP action. See InnerException, if present, for more details.

    Type 'Microsoft.Synchronization.Data.DbSyncException' with data contract name 'DbSyncException:http://schemas.datacontract.org/2004/07/Microsoft.Synchronization.Data' is not expected. Consider using a DataContractResolver or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer

    Please find my client traces run at different times:

    https://skydrive.live.com/redir?resid=FC5FC0DA6071CDAA!107

    https://skydrive.live.com/redir?resid=FC5FC0DA6071CDAA!107&authkey=!AI_6r0tfayw8Ddw

    My Observations:

    They are two sync_<guid> folders with .batch files in my batching directory. One sync_<guid> folder has files in it, another is empty. 

    Is this because of this empty sync folder I am getting above error messages? Bcz, client trace shows error thrown  at Applychanges method.


    Can we  avoid empty websync folders when applying changes.

    I have gone through following thread also:

    http://social.microsoft.com/Forums/en-US/syncdevdiscussions/thread/60d98896-9e0e-45e6-838b-9ad67e7bbc13/

    Please advice.






    ess




    • Edited by saitrips Tuesday, March 12, 2013 2:56 AM added additional info abt client trace
    Monday, March 11, 2013 11:51 PM

Answers

  • The problem is fixed.

    What I did?

    batchSize = 1024;

    localprovider settings:

    localProvider.MemoryDataCacheSize = 10240;
    localprovider.ApplicationTransactionSize = 10240;
     localprovider.CommandTimeout = 1000;

    remoteprovider settings:

    remoteprovider.MemoryDataCacheSize = 50;
    remoteprovider.ApplicationTransactionSize = 50; 

    The remote provider cache size and transaction size don't match the high batch size value. 

    Even cachesize and transaction size matches(high) at localprovider. I guess sync framework only picks the low value on the both the providers. so here it is using my remoteprovider settings during the sync process.

    when I changed the remote provider settings same as localprovider. It started working.

    My question is, but why the error says  at server side:

    Microsoft.Synchronization.Data.DbSyncException: The provider cannot continue to apply batches because the batch file that has index number 1 is missing. Ensure that all batch files that were generated by the remote provider have been received.
       at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ReadBatchFile(UInt32 expectedNumber, String& batchFileName)
       at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ApplyBatches(DbSyncScopeMetadata scopeMetadata, DbSyncSession syncSession, SyncSessionStatistics sessionStatistics)An unexpected error occurred when applying batch file C:\Windows\TEMP\WebSync_334217bd6afa46129f6d5fa3fda48c6d\00775dad-979b-4de0-9c2e-3871a913cc9d.batch. See the inner exception for more details.


    ess

    • Marked as answer by saitrips Thursday, April 4, 2013 2:41 PM
    Tuesday, March 12, 2013 3:23 PM
  • BatchSize is for the older DBServerSyncProvider...that refers to number of rows. the sync provide you're using is not using this property

    MemoryDataCacheSize  is what you're supposed to be using. it effectively divides your changesets into files using the size specified in the property.

    these links should be able to explain clearly how batching works:

    Deep Dive – Memory Based Batching

    DeepDive – Batching Directory and Batch Files

    • Marked as answer by saitrips Thursday, April 4, 2013 2:40 PM
    Wednesday, March 13, 2013 1:51 PM
    Moderator

All replies

  • New client trace.

    https://skydrive.live.com/redir?resid=FC5FC0DA6071CDAA!107

    every time it is failing at endsession with faultstate. please advice


    ess

    Tuesday, March 12, 2013 4:44 AM
  • I TROUBLESHOOTED MY CODE AND FOUND THE EXACT ROOT CAUSE OF THE PROBLEM:

    Error happening on remoteprovider---->applychanges method.

    Error messages:

    Microsoft.Synchronization.Data.DbSyncException: The provider cannot continue to apply batches because the batch file that has index number 1 is missing. Ensure that all batch files that were generated by the remote provider have been received.
       at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ReadBatchFile(UInt32 expectedNumber, String& batchFileName)
       at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ApplyBatches(DbSyncScopeMetadata scopeMetadata, DbSyncSession syncSession, SyncSessionStatistics sessionStatistics)An unexpected error occurred when applying batch file C:\Windows\TEMP\WebSync_334217bd6afa46129f6d5fa3fda48c6d\00775dad-979b-4de0-9c2e-3871a913cc9d.batch. See the inner exception for more details.

    the reason is SyncBatchHeaderFile.sync is missing in remote machine. all .batch files are transferred from client to remote machine expect the .sync file.

    please advice how to fix this.



    ess

    Tuesday, March 12, 2013 5:51 AM
  • can you enable Sync Framework Tracing to see how it's processing the files...
    Tuesday, March 12, 2013 11:37 AM
    Moderator
  • The problem is fixed.

    What I did?

    batchSize = 1024;

    localprovider settings:

    localProvider.MemoryDataCacheSize = 10240;
    localprovider.ApplicationTransactionSize = 10240;
     localprovider.CommandTimeout = 1000;

    remoteprovider settings:

    remoteprovider.MemoryDataCacheSize = 50;
    remoteprovider.ApplicationTransactionSize = 50; 

    The remote provider cache size and transaction size don't match the high batch size value. 

    Even cachesize and transaction size matches(high) at localprovider. I guess sync framework only picks the low value on the both the providers. so here it is using my remoteprovider settings during the sync process.

    when I changed the remote provider settings same as localprovider. It started working.

    My question is, but why the error says  at server side:

    Microsoft.Synchronization.Data.DbSyncException: The provider cannot continue to apply batches because the batch file that has index number 1 is missing. Ensure that all batch files that were generated by the remote provider have been received.
       at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ReadBatchFile(UInt32 expectedNumber, String& batchFileName)
       at Microsoft.Synchronization.Data.DbSyncBatchConsumer.ApplyBatches(DbSyncScopeMetadata scopeMetadata, DbSyncSession syncSession, SyncSessionStatistics sessionStatistics)An unexpected error occurred when applying batch file C:\Windows\TEMP\WebSync_334217bd6afa46129f6d5fa3fda48c6d\00775dad-979b-4de0-9c2e-3871a913cc9d.batch. See the inner exception for more details.


    ess

    • Marked as answer by saitrips Thursday, April 4, 2013 2:41 PM
    Tuesday, March 12, 2013 3:23 PM
  • sync fx will use the lower value in case of different settings for memorydatacachesize... how many mb is your typical sync session?

    i noticed you have the application transaction size set as well, are you using Azure? 

    Wednesday, March 13, 2013 12:00 AM
    Moderator
  • no I am not using Azure, I just copied code from azure sample example. so i commented transaction size in my app

    I made some big changes(2000 records) at client side and then started the sync to test the batching..

    they ar 1gb worth of changes.

    when I started sync batch files starts creating at client side.

    each batch file size is 500-600 kb.


    ess


    • Edited by saitrips Wednesday, March 13, 2013 2:22 AM
    Wednesday, March 13, 2013 12:42 AM
  • that's strange, your memory batch size is 10MB and yet your batch files are 500-600kb only...

    is it set to 10240 or 1024 only?

    if it's 1024 (1MB), that explains the 500-600kb batch size which is just roughly equivalent to your row size (1Gb / 2000). your batch size is just enough to hold one row since batching will not split a row into separate batches.

    Wednesday, March 13, 2013 12:07 PM
    Moderator
  • I guess I have a wrong look at the batch files size. 

    I will re run the test case and post you exact number(batch file size, what is batch size ,memorybatchsize set in the application)

    But, Could you please explain difference between batchsize and memorydatacachesize in sync framework 2.1.

    and what helps us to make a decision in assigning values to them. (I mean based on my size of my changedataset ,I should assign their values ?).

    Wht happens, Every time I set high number on memorydatacachesize and vary the batchsize values based on changedataset size. Will batching works?



    ess

    Wednesday, March 13, 2013 1:22 PM
  • BatchSize is for the older DBServerSyncProvider...that refers to number of rows. the sync provide you're using is not using this property

    MemoryDataCacheSize  is what you're supposed to be using. it effectively divides your changesets into files using the size specified in the property.

    these links should be able to explain clearly how batching works:

    Deep Dive – Memory Based Batching

    DeepDive – Batching Directory and Batch Files

    • Marked as answer by saitrips Thursday, April 4, 2013 2:40 PM
    Wednesday, March 13, 2013 1:51 PM
    Moderator
  • I had this error and I resolved by add max size data and increase timeout:

    <binding name="WSHttpBinding_ILetterRegistrationService" closeTimeout="00:50:00" openTimeout="00:50:00" receiveTimeout="00:50:00" sendTimeout="00:50:00" bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="52428800" maxReceivedMessageSize="2000000" messageEncoding="Mtom" textEncoding="utf-8" useDefaultWebProxy="true" allowCookies="false">
              <readerQuotas maxDepth="32" maxStringContentLength="200000000" maxArrayLength="200000000" maxBytesPerRead="524288" maxNameTableCharCount="524288" />
              <reliableSession ordered="true" inactivityTimeout="00:50:00" enabled="true" />
              <security mode="None">
                <transport clientCredentialType="Windows" proxyCredentialType="None" realm="" />
                <message clientCredentialType="Windows" negotiateServiceCredential="true" />
              </security>
            </binding>
    
      <endpoint address="http://myLink.svc" binding="wsHttpBinding" bindingConfiguration="WSHttpBinding_ILetterRegistrationService" contract="LetterReg.ILetterRegistrationService" name="WSHttpBinding_ILetterRegistrationService" />
    <time datetime="2019-11-03T08:21:21" itemprop="dateCreated" style="margin:0px;padding:0px;border:0px;font-variant-numeric:inherit;font-variant-east-asian:inherit;line-height:inherit;font-family:Arial, 'Helvetica Neue', Helvetica, sans-serif;vertical-align:baseline;box-sizing:inherit;color:#242729;transition:font 0s ease 0s;"></time>


    Each problem has a solution.

    Sunday, November 3, 2019 9:50 AM