locked
bidirectional sync between sql express and sql ent using WCF service : connection to server hangs RRS feed

  • Question

  • Hi,

    I am synchronizing two databases (client Sql express and server Sql ent) with the help of Sync services ADO.NET 2.0 and WCF service in between.

    I noticed sometimes after enumeration of changes at client ( after sucessful call to getchanges) when client tries to connect server for server enumeration or calling apply changes on server the Synchronization hangs for about 5 mins.

    Note : I have implemented all the steps mentioned here http://social.msdn.microsoft.com/Forums/en-US/uklaunch2007ado.net/thread/8698a0ce-25a4-4ac7-a4fb-c9f2492010dc
     
    Do I need to change my server WCF bindings or server connection string?
    • Moved by Max Wang_1983 Thursday, April 21, 2011 11:22 PM forum consolidation (From:SyncFx - Microsoft Sync Framework Database Providers [ReadOnly])
    Tuesday, September 8, 2009 6:28 AM

Answers

  • I found the problem,

    It was because of incorrect WCF throttling! I modified the service configurations with following values

    <serviceThrottling maxConcurrentCalls="10" maxConcurrentSessions="10" maxConcurrentInstances="10" />

    WCF request queue at server end was getting full after certain number of requests.
    • Marked as answer by mandy.work Friday, September 18, 2009 1:12 PM
    Friday, September 18, 2009 1:12 PM

All replies

  • Mandy,

    Are you using the new providers (i.e. SqlSyncProvider and SqlCeProvider)?  If so, could you take a look at the sample below and determine if there are any differences?

    C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.0\Runtime\ADO.NET\V3.0\Samples

    Also, what is occurring during this 5 min lag?  You should look at tracing exposed through System.Diagnostics and SQL Server profiler to determine what activity (if any) is happening during this lag.

    Regards,


    Sean Kelley
    Senior Program Manager
    Microsoft
    Tuesday, September 8, 2009 8:16 PM
    Moderator
  • Thanks for the reply Sean!

    We are using SqlExpressProvider. Also, we are not using the ADO.NET v3.0 since it is a CTP release, instead we are using the ADO.NET v2.0.

    We are still trying to figure out why the synchonization hangs.

    I am curious to know whether this is a known issue with ADO.NET v2.0?



    BTW WebSharingAppdemo  shared at

    C:\Program Files (x86)\Microsoft SDKs\Microsoft Sync Framework\2.0\Runtime\ADO.NET\V3.0\Samples is working for me 

    BUT I need to use Sql Express 05 as a client instead of Sql CE ; is it feasible?

    Thanks,
    Mandy

    Wednesday, September 9, 2009 2:03 PM

  • What is occurring during this 5 min lag?  You should look at tracing exposed through System.Diagnostics and SQL Server profiler to determine what activity (if any) is happening during this lag.

    Regards,

    Sean Kelley
    Senior Program Manager
    Microsoft
    • Marked as answer by mandy.work Monday, September 14, 2009 4:46 AM
    • Unmarked as answer by mandy.work Monday, September 14, 2009 4:46 AM
    Sunday, September 13, 2009 10:28 PM
    Moderator
  • Hi Sean,

    My observation is : no commands are called in client and server profilers and nothing logged during the same period with SyncTracer listener.
    Monday, September 14, 2009 9:38 AM
  • Couple of debugging suggestions:
    1. Can you try to find by Debugging where exactly the appln hangs?
    2. Try WCF tracing: http://msdn.microsoft.com/en-us/library/ms733025.aspx to track down the issue



    Wednesday, September 16, 2009 10:30 PM
  • I found the problem,

    It was because of incorrect WCF throttling! I modified the service configurations with following values

    <serviceThrottling maxConcurrentCalls="10" maxConcurrentSessions="10" maxConcurrentInstances="10" />

    WCF request queue at server end was getting full after certain number of requests.
    • Marked as answer by mandy.work Friday, September 18, 2009 1:12 PM
    Friday, September 18, 2009 1:12 PM