File sync fails randomly RRS feed

  • Question

  • Hi,

    We are using FileSync update the web application pages while promoting changes between environements, recently we noticed that its not syncing the files properly. We have built syncing application that updates the destination files from source files (Upload). Actually we are pushing the changes of web application pages from one environment to other environement. We have multiple such web applications that we update periodically.

    Recently we notived that in some cases its not updating the files on the destination. If we run the sync application again, everything works fine and all files gets updated as exepcted. Why its failing on first attempt? Is it because the source files are in used by some other application, like users are accesing the web pages? or Is it because of the number of files, we have approx. >14000 files in the web application. But very few <100 are different and needs to be updated in destincation env.

    However, the failing occurs only with one web application folder, other web application folders gets updated successfully.

    Any inputs will be greatly helpful.

    • Moved by Max Wang_1983 Wednesday, April 20, 2011 11:19 PM Forum consolidation (From:SyncFx - Technical Discussion [ReadOnly])
    Wednesday, July 29, 2009 7:24 PM


All replies

  • Hi -

    Try hooking up the progress events from the FileSyncProvider - if we cannot sync a file we notify you of this along with the error code we encountered. This should give you more information.

    Deepa ( Microsoft Sync Framework)
    Thursday, August 6, 2009 12:46 AM
  • Thanks Deepa.

    I added the  SkippedChange event to the code and tried to get the reason of the failure updating the destination file. After running a test I found following output. Its skipping the files with reason ConflictLoserWriteError. All the files that did not updated has the same skip reason returned.

    To clarify, we are running two processes simultaneously to update two destination servers with a single source. So is it possible that one process is interfering with the other process and hence the source files are inaccessible. But for me the confusing part is the reason code description given on the MSDN, it states "The conflict loser file could not be written". Here the conflict looser is the destination file and we have common source between two parallel update process. Also the destination folder is a temp folder and no other processes are using its files so there is no reason of write failure to destination files.

    Again if I run the same processes again everything works well and all files gets updated without anything getting skipped.

    Can you please help me out to figure out whats exactly failing the process? Meanwhile I will try running one process at a time to see whether I encounter the same problem again.

    Friday, October 16, 2009 10:50 PM
  • Nilesh,
    did you try running the processes sequentially? Are you still hitting the failure you described?

    Thursday, October 29, 2009 5:19 PM