After restarting a managed Windows PC, OneDrive for Business enters a sync loop for shared libraries. The sync icon spins continuously, files fail to sync, and the system may show high CPU usage. This problem typically occurs when OneDrive attempts to re-process a large or complex shared library after every reboot.
The root cause is a corrupted or oversized OneDrive sync database or a conflict with Group Policy settings that force Known Folder Move or library sync on startup. When OneDrive tries to rebuild the sync state from scratch after each restart, it gets stuck in a processing cycle that never completes.
This guide explains the technical reasons behind the sync loop and provides step-by-step fixes for IT administrators and power users. You will learn how to reset the sync database, adjust Group Policies, and prevent the loop from recurring on managed Windows 10 and Windows 11 PCs.
Key Takeaways: Stopping OneDrive Shared Library Sync Loops
- OneDrive Settings > Account > Choose folders: Unsync and re-sync the problematic shared library to clear a stuck processing state.
- %localappdata%\Microsoft\OneDrive\settings\Business1: Delete the sync database files (ClientPolicy.db and PersonalSyncFolder.db) to force OneDrive to rebuild the sync state.
- Group Policy > Administrative Templates > OneDrive > Set the maximum file size for syncing: Limit file size to reduce processing load and prevent loops with large files.
Why OneDrive Shared Library Sync Loops After Restart
When a managed Windows PC restarts, OneDrive re-initializes all configured sync relationships. For shared libraries with thousands of files, deep folder hierarchies, or file names with special characters, the sync engine must re-read the entire library structure from the server. If the local sync database is corrupted or contains stale entries, the engine enters an infinite loop of comparing local and server states.
Group Policy settings can worsen the problem. Policies that force Known Folder Move or mandate sync of specific libraries cause OneDrive to attempt a full sync immediately after reboot. On networks with slow bandwidth or high latency, the sync process may time out and restart repeatedly.
Another common cause is a file or folder name that violates Windows naming rules, such as a trailing period or a reserved name like “CON”. OneDrive cannot sync such items, so it keeps retrying the entire library.
Steps to Fix OneDrive Shared Library Sync Loops
- Pause and resume OneDrive sync
Right-click the OneDrive icon in the system tray. Select Pause syncing and choose 2 hours. After 2 hours, OneDrive resumes automatically. This often breaks a temporary loop by giving the server time to reset the sync state. - Unsync the problematic shared library
Open OneDrive Settings by right-clicking the OneDrive icon and selecting Settings. Go to the Account tab. Under Manage Storage, click Choose folders. Clear the check box for the shared library that is looping. Click OK. OneDrive removes the local folder. Wait 5 minutes, then open the same dialog and re-check the library. This forces a fresh sync from the server. - Delete the OneDrive sync database
Close OneDrive completely. Right-click the OneDrive icon and select Quit. Press Windows+R, type%localappdata%\Microsoft\OneDrive\settings\Business1, and press Enter. Delete all files in this folder. Restart OneDrive from the Start menu. OneDrive rebuilds the sync database and re-syncs all libraries. This is the most effective fix for a corrupted database. - Reset OneDrive using the command line
Press Windows+R, type%localappdata%\Microsoft\OneDrive\onedrive.exe /reset, and press Enter. Wait 60 seconds. If OneDrive does not restart automatically, press Windows+R again and type%localappdata%\Microsoft\OneDrive\onedrive.exe. This command resets all sync settings and removes all cached file data while keeping your local files intact. - Check for file or folder name issues
Open the shared library in a web browser. Look for files or folders with names ending in a period, containing a leading space, or using reserved names like CON, PRN, AUX, NUL, or COM1. Rename or delete these items. OneDrive cannot sync them and will loop indefinitely. - Adjust Group Policy for sync throttling
On a managed PC, run gpedit.msc. Navigate to Computer Configuration > Administrative Templates > OneDrive. Enable the policy Set the maximum file size for syncing and set it to 100 MB. Enable the policy Limit the sync upload speed to a fixed rate and set it to 512 Kbps. These policies reduce the load on the sync engine and prevent timeouts. - Disable Known Folder Move temporarily
Open the same Group Policy editor. Navigate to Computer Configuration > Administrative Templates > OneDrive. Set the policy Prompt users to move Windows known folders to OneDrive to Disabled. Apply the change and run gpupdate /force in Command Prompt. Restart the PC. After the sync loop is resolved, re-enable the policy.
If OneDrive Still Has Issues After the Main Fix
OneDrive shows an error code 0x8007016A after restart
This error indicates that OneDrive cannot access the local sync folder due to file system corruption. Run chkdsk /f on the drive where OneDrive stores files. Open Command Prompt as administrator and type chkdsk C: /f. Replace C: with the correct drive letter. Restart the PC to allow chkdsk to run. After chkdsk completes, repeat the sync database deletion steps.
OneDrive sync loop continues on multiple managed PCs
If the loop affects many devices, the problem is likely in the shared library itself. Ask the library owner to check for large files over 10 GB or folders with more than 100,000 items. OneDrive struggles with libraries that exceed these thresholds. The owner should archive old files or split the library into smaller libraries.
OneDrive uses 100% CPU after restart
High CPU usage after restart often means OneDrive is stuck processing a single large file. Identify the file by opening OneDrive Settings > Network and checking the upload or download speed. If no progress appears, pause sync, delete the sync database, and restart OneDrive. If the problem recurs, exclude the file from sync by moving it out of the OneDrive folder.
Sync Loop Fix Methods: Comparison
| Item | Pause and Resume | Delete Sync Database | Reset OneDrive |
|---|---|---|---|
| Time to complete | 2 hours automatic | 10 minutes | 5 minutes |
| Data loss risk | None | None | None |
| Effectiveness for loops | Low | High | Medium |
| Requires admin rights | No | No | No |
| Resets sync settings | No | No | Yes |
For persistent loops, delete the sync database first. If the problem returns after a restart, use the reset command to clear all cached data and start fresh.
After applying these fixes, OneDrive should sync shared libraries normally after each restart. To prevent future loops, monitor the size of shared libraries and enforce Group Policies that limit file size and sync speed. For IT administrators, deploying the policy “Set the maximum file size for syncing” across all managed devices is the single most effective preventive measure. Consider enabling the OneDrive sync health report in the Microsoft 365 admin center to receive alerts when sync issues occur on managed PCs.