Skip to content

Chunking the syncing process to less than 400 ops/request still leads to error: ErrorHandler.Chunk: Limit Exceeded: the request to the server is too large.CKError.Code: 27 #143

Description

@jamesryu108

Expected behavior

I am inside of syncRecordsToCloudKit function of SyncEngine class. Inside the completion block called modifyRecordsCompletionBlock of modifyOpe, chunkItUp function is used to request less than 400 operations on a single request:

            let chunkedRecords = recordsToStore.chunkItUp(by: 300)
            print("CHUNKING BY: \(chunkNumber)")

            for chunk in chunkedRecords {
            print("chunk: \(chunk.count)")
                self.syncRecordsToCloudKit(recordsToStore: chunk, recordIDsToDelete: recordIDsToDelete, completion: completion)
            }

This should sync data 300 ops at a time without a problem.

Actual behavior(optional)

However, I get an error message as if I went over 400 operations per request:

ErrorHandler.Chunk: Limit Exceeded: the request to the server is too large.CKError.Code: 27

output:
CHUNKING BY: 300
chunk: 300
chunk: 300
chunk: 157

This problem results in not even single data being synced to the iCloud. How do we bypass this problem?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions