This is a resource issue, an attempt to write large number of records, and close a file, fails.

To correct this:
Schedule the sync to run at a time when there's relatively few tasks/syncs running.