Replies: 3 comments 4 replies
-
|
Hi @Ryu0118, as far as I know the So, can you 100% confirm that none of the data was sent to iCloud? And can you share the SQLiteData logs by filtering for the "SQLiteData" subsystem in Xcode? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @Ryu0118, I have not been able to reproduce this issue. I used the CloudKitDemo app that comes with the repo to create 1,000 counters while the sync engine was not running. Then I enabled the sync engine and ran the app from scratch, and from the logs I can see that it correctly batched those results into sets of ~250 records. Here are the logs: Click to expand logsSince this doesn't appear to be an issue with the library I am going to convert it to a discussion. If you can gather more information for us, or provide a minimal project that reproduces the problem, we will look into it more. |
Beta Was this translation helpful? Give feedback.
-
|
@mbrandonw I am also seeing this issue with my app (the one I gave you access to my private repo). Over the last 4 months I inserted and deleted lots of data. Yesterday I started fresh with a simulator and when the app on the simulator tried to download all the data, it started downloading the data and seemed to be making progress but after downloading some I started seeing lots of errors such as: ...SourcePackages/checkouts/sqlite-data/Sources/SQLiteData/CloudKit/SyncEngine.swift:1448 Caught error: <CKError 0x139f78540: "Limit Exceeded" (27/1020); "Your request contains 1227 items which is more than the maximum number of items in a single request (400)">: SQLiteData CloudKit Failure I decided to try it this morning on my iPad by deleting the app and re-installing it and the same thing happened so it's not just a simulator issue. As @mbrandonw may recall my app has a hierarchy of tables (Courses which has Students, Dates, and then AttendanceDates have a reference to a Student and a Date, with a fake "parent" for one of the foreign keys. The top level courses all got loaded in (8 of them), but for some of the courses, none of the people got loaded. For some none of the dates got loaded. For a few only the last couple dates got loaded, etc. The vast majority of the data is missing. You continue to have access to the app and I'm happy to try to get enough sample data that you can see the issue or if you'd like to do a remote screen sharing and see it in Xcode, I'm also happy to arrange a time to do that. And to answer the question @mbrandonw asked of @Ryu0118 yes, I am certain the data is getting synced to iCloud. The data was on my iPad before I deleted the app. Relatively mall amounts of incremental data seem to sync fine, but trying to download all the records when a fresh install of the app occurs does not work. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Description
When synchronizing tables with a large number of records (e.g., LocationPoint with GPS coordinates), CloudKit sync fails with a "Limit Exceeded" error because CloudKit has a hard limit of 400 items per request.
This occurs during initial sync or when a large batch of records needs to be synchronized.
Expected behavior
SyncEngineshould automatically chunk large batches of records into groups of 400 or fewer items per CloudKit request, similar to how batch operations are handled in the application layer.Actual behavior
SyncEngineattempts to sync all pending records in a single CloudKit request, which fails when the count exceeds 400 items.Reproducing scenario
SyncEnginefor that tableResult: CloudKit sync fails with "Limit Exceeded (27/1020)" error
Suggested solution
Add automatic chunking in
SyncEngineto split large batches into 400-item chunks before sending to CloudKit, similar to:Destination operating system
iOS 26
Xcode version information
Xcode 26.2
Beta Was this translation helpful? Give feedback.
All reactions