Fix an update conflict has occurred, and you must re-try this action issue with AutoSPInstaller 2013

I was facing issue, while running the AutoSPInstaller 2013 at the time of user profile creation it fails and throw an error as,

"An update conflict has occurred, and you must re-try this action. The object UserProfileApplication Name=User Profile Service Application was updated by domain\admin, in the OWSTIMER (#) process on machine (#). View the tracing log for more information about the conflict."

This can happen with any service application this is just an example.

We know several cache in SharePoint, With this issue meet me to cache configuration cache and issue is resolved by clearing that cache.

Just giving little background about configuration cache, it is basically to store the configuration information in the cache on the farm server to avoid sql calls to pull information from configuration database. sometime cache corrupted or cache information get outdated or needs to rebuilt.

So following are the steps to clear cache -(you can find this steps in many blogs and site) still I am mentioning it

  1. Stop the OWSTIMER service on ALL of the MOSS servers in the farm.
  2. On the Index server, navigate to:
    1. Server 2003 location: Drive:\Documents and Settings\All Users\Application Data\Microsoft\SharePoint\Config\GUID and delete all the XML files from the directory.
    2. Server 2008, 2012 location: Drive:\ProgramData\Microsoft\SharePoint\Config\GUID and delete all the XML files from the directory.

      (Note- ProgramData folder is hidden , you need to make it visible)
       
  3. Delete all the XML file in the directory. NOTE: ONLY THE XML FILES, NOT THE .INI FILE.
  4. Open the cache.ini with Notepad and reset the number to 1. Save and close the file.
  5. Start the OWSTIMER service on the Index server and wait for XML files to begin to reappear in the directory.
  6. After you see XML files appearing on the Index server, repeat steps 2, 3 & 4 on each query server, waiting for XML files to appear before moving to subsequent servers.
  7. After all of the query servers have all been cleared and new .xml files have been generated, proceed to the WFE and Application servers in the farm, following steps 2, 3, 4 and 5 for each remaining server.

Referred link-

http://blogs.msdn.com/b/josrod/archive/2007/12/12/clear-the-sharepoint-configuration-cache-for-timer-job-and-psconfig-errors.aspx