All Clients not able to sync but few can. RRS feed

  • Question

  • Hi,


    We have a WPF application using SQL CE as client and SQL server as the main DB server. Schema is plain without any relation between any tables. Client uses the WCF service to sync the data with the main server. Also not using the SQL Change tracking.

    Issue we are getting is while few clients are able to sync completely all the tables (one by one or combined) but few clients are not able to sync. In failure cases the client hits the service and then service start consuming memory beyond limits and it goes on untill the time out limit is reached. The same table for other clients get synced in few minutes.

    Any suggestions, where the problem can be.



    Friday, June 3, 2011 1:28 AM

All replies

  • are you using SqlCeClientSyncProvider/DbServerSyncProvider?

    does each client get the same number of rows? or some clients has more rows to download?

    please enable Sync Framework tracing so we can see what's happening underneath.

    Friday, June 3, 2011 1:50 AM
  • Thanks for the reply.

    Yes we are using SqlCeClientSyncProvider/DbServerSyncProvider.

    Yes each client almost gets the same number of rows. I'm saying almost because the client syncing second may have few more rows inserted from the first client sync.

    We are having this problem on Production so please help me how can I enable tracing without affecting the service.

    Friday, June 3, 2011 2:34 AM
  • see this link on how to setup tracing: http://msdn.microsoft.com/en-us/library/cc807160.aspx


    Friday, June 3, 2011 2:41 AM
  • how much memory does it consume ? is the memory usage beyond what it should be for this case ? say, the dataset to be sync-ed with 10M per sync ( client ) and we have 10 clients syncing at the same time, is the memory usage on server ( assume this is dediated for sync ) 100MB, 300MB or 600MB or more ?

    call stacks, tracing ( as JuneT stated) should be helpful here.



    This posting is provided "AS IS" with no warranties, and confers no rights.
    Friday, June 3, 2011 2:16 PM
  • Hi Yunwen,

    It almost use like 800 MB of private memory while the committed memory goes up to 1 GB for the service process. The issue is that the process never seems to end, the sync goes on and on and only ends after the time out. Adding to this the issue comes when a particular client tries to sync a particular table. This is so frustrating as with the same Setup I can sync all the table and few other clients can also.

    Friday, June 3, 2011 4:37 PM
  • did you get a chance to enable tracing or running sql profiler to check what's going on?
    Tuesday, June 7, 2011 12:54 AM
  • Hi All,


    Well I have been able to trace and the problem is that there are "Client Insert Server Insert" conflict for that table. Now the issue is the rows are actually the same. There have been no new inserts.

    Please now if you can suggest something.

    Wednesday, June 8, 2011 1:59 PM
  • does this happen the first time this particular client syncs? does your client have pre-existing data prior to the first sync?

    Sync Fx doesnt really compare if the rows are the same or different. for the client, it just checks if there are rows thats has been changed since the last time it uploaded rows (using the lastsentanchor) and it checks for rows from the server from the last time it downloaded (using the lastreceivedanchor)

    in your case, it looks like the client is uploading rows and those rows already exists in the server.

    Thursday, June 9, 2011 12:06 AM
  • Hi June T,


    I understand your point here but the problem is that the rows have not been changed either on the client or the server but even then one particular client is getting this conflict.

    Now the issue is if I don't give any conflict resolution for this the conflict resolution collection gets too big on the server and almost uses 90% server memory. Other way if I provide the resolution for this conflict it almost take 40-50 minutes to resolve 30,000 rows.

    Any comments.

    Thursday, June 16, 2011 5:55 AM
  • does the problem client have rows on its tables before the 1st sync?
    Thursday, June 16, 2011 6:23 AM