Stalled/stuck sync on iOS

Viewing 15 reply threads
  • Author
    Posts
  • May 1, 2014 at 7:31 AM #9898

    divinenanny
    Participant

    The last update seemed to fix syncing again. I got my iPhone, iPad and Mac synced up again. I was happy to see some sort of status for syncing (10000 records to go). But then I was working on my iPhone and it started to sync. Even though there was no new data (I planned to add some) it had about 15000 records/rows to sync. And then it stuck there for 30 minutes.
    I need my phone for other things, so I quit the app (I know this corrupts the sync and leads to mayhem).
    Now, the app won’t open on my phone.

    What is the best course of action that leads me to an in-sync working TapForms on my phone, iPad and Mac, with the least amount of re-syncing?

    May 1, 2014 at 1:40 PM #9922

    Brendan
    Keymaster

    Hi,

    I think if you launch it a bunch of times, it may come back. It may be attempting to finish up what it was doing before you aborted the process. However, you may need to uninstall it and then re-install it and then re-enable iCloud Sync to get it to sync again from the beginning.

    But I would recommend doing a Reset iCloud Sync after you uninstalled it. Then re-enabling iCloud Sync on each device, then click the upload to iCloud button on your Mac to send the data from your Mac over to your iPhone.

    Thanks,

    Brendan

    May 1, 2014 at 11:31 PM #9939

    divinenanny
    Participant

    Thanks. I ended up removing and re-installing the app. This weekend I am going to do a full iCloud sync reset on all devices.

    Thanks for your help!

    May 2, 2014 at 12:14 AM #9941

    divinenanny
    Participant

    Follow-up question. What is the absolute best way to completely start over with iCloud syncing?
    Let’s say I’ll take the forms on my Mac as my Master-copy. I’ll delete TapForms from my iPhones and iPad. I’ll reset iCloud Sync.
    Does that mean TapForms sync files are also gone from iCloud?

    (I’d then re-install on each device, turn on iCloud sync, wait a couple of hours, and then do the next device.)

    May 2, 2014 at 1:55 AM #9944

    Brendan
    Keymaster

    Hi,

    Yes, if you reset iCloud sync, Tap Forms deletes the sync files from iCloud plus it resets some internal variables that Tap Forms uses to keep track of which sync files it has processed already. A sync file is just the changes made since the last time you tapped (or clicked) on the upload to iCloud button. If it’s the first time you did it, then the sync file contains the entire database (although without indexes, so it’s smaller than your main database file). When you upload to iCloud the first time, the sync file may be quite large, so it may take a while on the other side to do the auto-sync. You just need to let it finish what it’s doing without interruption if you can.

    The new versions shows you a countdown of the number of table rows that it’s currently processing. But at the end of that it must rebuild the search index. There’s no countdown for that because it happens in one large operation. If you interrupt that stage, the database may need to attempt to process any commit logs which didn’t get a chance to be processed. That happens during startup of the app. that’s why it appears to hang at startup. But Apple’s launch mechanism will prevent an app from taking too long to startup. This can be a problem because you only have 20 or so seconds to launch the app. So it could take repeated launch attempts to get it going again. I know it’s not an ideal situation.

    Thanks,

    Brendan

    May 2, 2014 at 3:01 AM #9945

    divinenanny
    Participant

    Thanks for the extra info. Just out of curiosity, yesterday I had a big sync (300.000 rows+). It synced (with the countdown), started to index, and then seemed to sync the rows again (with the countdown). Is that normal?

    May 2, 2014 at 3:21 AM #9946

    Brendan
    Keymaster

    Hi,

    Yes, that’s normal. The countdown is for each table that’s being synced. The really BIG one will be the field_value table. Smaller ones will be some of the other tables. I know it should probably be a complete overall countdown, but I thought it was better to show some sort of countdown than to just show a spinner constantly. At least this way you can see that Tap Forms is actually doing something. The biggest one I’ve synced so far was something like 450,000 rows.

    Thanks!

    Brendan

    May 2, 2014 at 3:55 AM #9947

    divinenanny
    Participant

    Oh then I’m getting to be in the league of the big tables ;)
    I love the countdown!

    May 2, 2014 at 5:23 AM #9951

    divinenanny
    Participant

    BTW, I just noticed I had 650.000+ rows. After a first index of about 500.000 previous rows :D And even though it takes a (long) while, it is extremely stable after the first (correct) sync, and pretty snappy too!

    May 3, 2014 at 12:49 AM #9956

    Brendan
    Keymaster

    Hi,

    The reason why it’s so large is because Tap Forms stores values in rows within a table in the database. For example, if you have a form with 10 fields and you have 100 records in the form, Tap Forms will store 100 rows to represent the records, then 10 x 100 = 1000 rows to store the values. Basically one row per value multiplied by the number of records in the form. PLUS, it will also store the same amount of rows in the search index. The search index makes searching fast.

    Just a little technical details on how data is stored.

    Thanks!

    Brendan

    May 3, 2014 at 7:47 AM #9964

    Philip Tate
    Participant

    I’ve been trying for two days to sync my iPad mini with my MacBook Pro. The data is on the Pro, and I’ve reset sync multiple times, but when I click the sync button it takes about two seconds to finish, and the mini never gets anything but errors. I’ve also reinstalled the iOS app (3.8.1). I went through system preferences to turn off/on data syncing. Don’t know what else to do.

    Update: After turning iCloud syncing of data off then on, TF on the Mac said sync disabled. I restarted the app, clicked sync, and it’s been syncing now for some time (ten minutes or so, 100% CPU usage.So at least it appears to be uploading to the cloud.

    May 3, 2014 at 11:57 AM #9969

    Philip Tate
    Participant

    You said it “took a long while” to sync. I’ve been waiting hours for under 2,000 rows in a 60MB database. Should I give up? Thanks.

    May 3, 2014 at 1:22 PM #9970

    divinenanny
    Participant

    For me it was about two hours for a database of twice about 500.000+ rows (Brendan’s way of counting) ;) I have two main forms, one of 3500 records and lots of fields, and one with 5500 records and only 5 fields.

    But yeah, I’d say it is taking too long. Do you see the counter, and if you do, is it moving?

    May 3, 2014 at 1:27 PM #9971

    Philip Tate
    Participant

    I don’t see a counter. Where should it be?
    Thanks.

    May 3, 2014 at 2:29 PM #9977

    Brendan
    Keymaster

    The counter displays only on the iOS version at the top of the screen.

    Did you remember to set the exact same encryption key on each device? If not, that can cause sync to fail.

    Thanks!

    Brendan

    May 3, 2014 at 2:53 PM #9978

    Philip Tate
    Participant

    I didn’t know encryption keys were mandatory. So I did that, clicked on Sync Now on my Mac, and on the iPad I’m getting text at the top of the screen, alternating sync and processing messages. Does that mean it’s working (I got these messages before).
    Thanks.

    May 3, 2014 at 4:37 PM #9980

    Philip Tate
    Participant

    It’s working now. I don’t know why. I did the same procedures over and over, then it magically worked. I suspect it’s got something to do with a lag in the cloud, but that’s only a wild guess.

    May 3, 2014 at 6:47 PM #9989

    Brendan
    Keymaster

    Hi Philip,

    Now that you have the same encryption key set, Tap Forms is able to read the sync files generated from each device. So that makes syncing work.

    Thanks!

    Brendan

Viewing 15 reply threads

You must be logged in to reply to this topic.