100MB Database Sync Issues

Jun 26, 2014 at 11:37 PM
I am currently trying to sync an extremely large database (100 MB) and it keeps failing no matter what I try. The error I got is below:
"The underlying connection was closed: An unexpected error occurred on a receive."
I have tried to change the ServicePointManager.MaxServicePointIdleTime on the server as well as the IIS connection timeout (I changed it to 16 minutes and the sync fails with the error in under 13 minutes) but nothing seems to work. Any ideas?
Jun 30, 2014 at 3:17 PM
Do you have enabled batch mode on the server side config ?
 // Because my json may be huge, i enable the batch mode
            config.SetDownloadBatchSize(2 * 1024);
Jun 30, 2014 at 6:02 PM
Yeah, I have that exact code in my server config
Jul 1, 2014 at 8:22 AM
Well, that's strange....
Can you send me a repro to be able to reproduce your problem ?
Jul 7, 2014 at 11:39 PM
Here are the sanitized web.config and SyncService.svc.cs files:

using Microsoft.Synchronization.Services;
using System.Configuration;
namespace FDA {
    #region SyncService: Configuration and setup
    public class FDASyncService : Microsoft.Synchronization.Services.SyncService<FDAOfflineEntities> {
        public static void InitializeService(Microsoft.Synchronization.Services.ISyncServiceConfiguration config) {
            // Connection string from web.config
            config.ServerConnectionString = ConfigurationManager.ConnectionStrings["lar-sv-db01"].ConnectionString;

            // The scope to use
            config.AddFilterParameterConfiguration("VegCollectionData_ID", "VegCollectionData", "@VegCollectionData_ID", typeof(System.Guid));
            config.AddFilterParameterConfiguration("Visit_ID", "Visit", "@Visit_ID", typeof(System.Guid));
            config.AddFilterParameterConfiguration("Picture_ID", "Picture", "@Picture_ID", typeof(System.Guid));
            config.AddFilterParameterConfiguration("QualVegCollectionData_ID", "QualVegCollectionData", "@QualVegCollectionData_ID", typeof(System.Guid));
            // I want to discuss with the JSON format ODataJson

            // The server is always true

            // for debug purpose, I need the whole error details
            config.UseVerboseErrors = true;

            // Because my json may be huge, i enable the batch mode
            config.SetDownloadBatchSize(2 * 2024);

            //ServicePointManager.MaxServicePointIdleTime = 20 * 60 * 1000;
            //ServicePointManager.Expect100Continue = false;
<?xml version="1.0" encoding="utf-8"?>
    <compilation debug="true" targetFramework="4.5" />

    <httpRuntime targetFramework="4.5"/>
        <add name="lar-sv-db01" connectionString="Data Source=myservice.myserver.com;Initial Catalog=VegetationSyncdb;User Id=myUser;Password=MyPass;" />
                        <add value="fdasyncservice.svc" />

        <requestLimits maxAllowedContentLength="524288000"/>

    <validation validateIntegratedModeConfiguration="false" />
      <limits maxRequestEntityAllowed="2147483647" bufferingLimit="2147483647" />


            <binding closeTimeout="00:20:00" openTimeout="00:20:00" receiveTimeout="00:20:00" sendTimeout="00:20:00" maxBufferSize="2147483647" maxBufferPoolSize="2147483647" maxReceivedMessageSize="2147483647"  />

Jul 8, 2014 at 9:37 AM
It's ok in my point of view