CloudKit syncing stalls about once a day

CloudKit syncing is overall a fantastic improvement. However, in my case, about once a day, it hangs and nothing can be done about it other than restarting DT3 (I’m on the latest, 3.6.3). On the iOS side, CloudKit syncing seems to be perfect, never need to restart DTTG.

The occurrences are fairly random, average on the order of once a day. When I notice it, in the sync pref panel, one of the DBs has the spinning symbol next to it and it just hangs there. It can be any of my handful of DBs, so it’s not a particular file. After restarting, things sync again.

Interesting: during the hang, using “Quit” in the DT menu will do nothing. However, using it with the Dock does the trick, sometimes right away, sometimes on the second try.

I’ve played with the number of max. connections for the sync, but that has not changed anything as far as I can tell (I usually have it set to 4).

Is anyone else experiencing this?

Are you leaving the Sync preferences open all the time?

That’s an excellent question! Originally, I did not, but then when I started tracking this problem, I began to keep them open. It seems that this neither made it worse nor better. Is it known that this causes a problem? I will keep them now closed again, and only open when I suspect that syncing is hanging, which I usually notice when stuff does not show up on my iOS devices.

We had a potential issue a little while ago that could be exacerbated by leaving the preferences open all the time.

In the event of a (potential) sync issue, check the sync icon in DEVONthink To Go and DEVONthink’s Window > Log first.

After keeping the preference/sync pane closed, sync ran for about 3 days, and it looked like we were onto something (even though I only started to keep the pane open after the stall happened at least a few times, so the effect was definitely there before). Alas, last night, got a stall again.

In the event of a (potential) sync issue, check the sync icon in DEVONthink To Go and DEVONthink’s Window > Log first.

The log window shows nothing. DT obviously does not think anything is wrong. Likewise, DTTG shows no problems. For its point of view, the sync store is up to date, just nothing new coming from the Mac side, as if the computer was turned off. So still, only way to notice the stall is to either check the sync pane and/or to realize that something that was added today on the Mac does not make its way to DTTG.

By the way, my original observation that only the dock version of “quit” works is not correct. But you have to use “quit” in the DT menu twice in a row for anything to happen. The first instance does nothing.

The first quit will conclude any unfinished application business first.

Roughly daily stalls still happening. First I thought that a machine reboot fixed it (no OS nor DT updates associated with it), but that was just a fluke, it seems. After a couple of days, DT started hanging again about once a day. I now keep the pref pane always closed except to quickly check when I suspect that sync no longer happens. Log never shows anything associated with those hangs. Since then, upgraded to DT 3.7 and it still happens.

I can certainly live with it. It’s odd that no one else seems to have this issue. Something specific to my setup? I should stress that each hang happens with a random DB, so it’s not just some funky DB that causes this.

A new macOS update is available now. Let’s see whether that does anything, in case this has to do with Apple’s side of CloudKit.

Could you please launch Apple’s Activity Monitor application (see Applications > Utilities), select DEVONthink 3 in the list of processes when this happens again, choose the menu item View > Sample Process and send the result to cgrunenberg - at - Thanks in advance!

This problem has been getting worse. I’m now on macOS 11.3.1 and DT 3.7.1 and the stall start to happen multiple times a day. Everything else on my computer that uses iCloud seems to function completely normal (other than Safari tab and history syncing). Also, restarting DT immediately fixes the situation, so ultimately, this seems to be on the DT side of things.

However: looking for things to test out, I noted that I have been (naturally) using “Synchronize:automatic”. About 4 days ago, I switched that to “every 15 minutes” and had no stall since. Of course, hard to tell what the reason could be. Is the stall explicitly caused by code specific to the “automatic”? Or are stalls statistically occurring every so-and-so many attempts, and with “15 minutes”, I reach that point much more slowly (I don’t have a good feel for how often the automatic version has to kick in, which obviously depends on DT usage)? To accelerate this test a bit, I’m now switching to “every minute”. We’ll see how long that runs trouble free. I’ll report back.

For DEVONthink the schedule doesn’t make a difference, for CloudKit (which causes the stall) maybe.

After 1 day of 1-minute sync, no stall, so that’s 1440 in a row. And several days prior to that at a 15-minute interval without stalling.

For DEVONthink the schedule doesn’t make a difference, for CloudKit (which causes the stall) maybe.

With 1-minute interval and 7 DBs to sync, the sync process is almost continually active. Every couple of seconds, another DB gets updated. That level does not seem to offend CloudKit.

Automatic syncing would in average be significantly less often. Is this an issue of bursts of activity? How quickly does “automatic” follow up when the DBs are locally changed? Could it get ahead of itself when there is a fast sequence of local DB changes, i.e. a new need to sync while the previous one is still going on?

I really seem to be the only one on this forum with this issue. I don’t think I have an unusual setup. Quite good internet connection. But I do use a very weak Mac, a 2016 1.2 GHz MacBook.

I now declare this experiment to be finished. I will work now with a 5-minute sync interval, which is fine for my purposes (if I need something transferred faster to the other devices, I’ll hit the sync button). Eventually, I’ll try automatic again to see whether the stalls are still reproducible.

Maybe for CloudKit but not for DEVONthink. But only one database is actually synchronized after another in case of one sync store, meaning that more databases do not increase the concurrent activity.

Depending on the sync location and the last local change, the interval varies from 15 to 120 seconds. In case of push notifications (meaning that another device uploaded changes) the changes are immediately downloaded.