ssb-browser-demo icon indicating copy to clipboard operation
ssb-browser-demo copied to clipboard

Sync button

Open KyleMaas opened this issue 5 years ago • 9 comments

From what I've seen of older screenshots, ssb-browser-demo used to have a sync button to manually sync right away rather than wait for the scheduler to kick in. It would be nice if we had that feature back.

KyleMaas avatar Jan 30 '21 15:01 KyleMaas

I think this was before ssb conn. I would actually rather have an offline mode.

arj03 avatar Feb 01 '21 20:02 arj03

I guess we can close this now?

arj03 avatar Feb 08 '21 19:02 arj03

Not sure. I have still run into situations where the scheduler didn't actually kick in until after I refreshed the page. But I haven't been able to track those down yet to see why. I suppose you could do the same thing with going offline and then online again, though.

KyleMaas avatar Feb 08 '21 19:02 KyleMaas

It just did it again on me. Clicking the refresh button on Public did nothing. But I refreshed the page, and I got about 2 hours' worth of messages that came in. This, on the console, seems to also kick it out of a stuck position:

SSB.net.connScheduler.stop();SSB.net.connScheduler.start()

Doesn't even need a delay between them to work. So I'm thinking if we did do a "Manual Sync" button, that's probably all it would need to do.

KyleMaas avatar Feb 08 '21 22:02 KyleMaas

Wierd. Havn't seen that. I would of course rather fix the sync issue than having a manual sync button.

arj03 avatar Feb 09 '21 07:02 arj03

Sync stopped again. Connections screen said both followed and extended were 100% synced, but the latest Public message was about 4 hours old. Tried going offline and online, and it never tried connecting to the pub again. Refreshed the page. Still didn't try to connect to the pub. Manually clicked the button to connect to the pub. Several seconds later, I had 49 new messages on the Public tab.

I noticed in the logs that there were several times the pub server's stream was closed before it finally quit. Is there a limit to the number of connection retries before a connection is considered dead and is not retried again?

KyleMaas avatar Feb 20 '21 21:02 KyleMaas

Got stuck again. Last message was listed as several hours ago. Refreshed the browser, it reconnected to the pub and downloaded recent messages. Still have no idea why it keeps doing this.

KyleMaas avatar Feb 28 '21 13:02 KyleMaas

Stuck again. Last message listed as "12 hours ago". After that is "12 hours ago" and "21 hours ago". Connections shows "Last update received" on the pub as about 30 minutes ago. Followed sync and Extended sync are both showing as 100% complete. "Use Offline" and then "Connect Online" did not fix the problem.

DB status in stuck condition:

{
  "log": 178495373,
  "jit": {},
  "indexes": {
    "keys": 178495373,
    "ebt": 178495373,
    "fullMentions": 178495373,
    "base": 178495373,
    "aboutSelf": 178495373,
    "channels": 178495373,
    "contacts": 178495373
  },
  "totalPartial": 1711,
  "profilesSynced": 1711,
  "contactsSynced": 1711,
  "messagesSynced": 1711,
  "totalFull": 10,
  "fullSynced": 10
}

EBT Status in stuck condition:

{
  "id": "@MI0aKQls1HIrZlyl4qSAW4ErLqb4xVUN+diSbG0j7Fc=.ed25519",
  "seq": 48,
  "peers": {
    "@lbocEWqF2Fg6WMYLgmfYvqJlMfL7hiqVAV6ANjHWNw8=.ed25519": {
      "seq": 48
    }
  }
}

Refreshed page. Newest Public message is now listed as "21 seconds ago".

Unstuck DB status:

{
  "log": 179166460,
  "jit": {
    "seq": 179166460,
    "timestamp": 179166460,
    "sequence": 179166460,
    "value_content_type_post": 179166460,
    "value_content_type_about": 179166460,
    "meta_": 179166460,
    "value_content_root__map": 179166460,
    "value_content_type_vote": 179166460,
    "value_content_vote_link__map": 179166460
  },
  "indexes": {
    "ebt": 179166460,
    "fullMentions": 179166460,
    "keys": 179166460,
    "channels": 179166460,
    "aboutSelf": 179166460,
    "contacts": 179166460,
    "base": 179166460
  },
  "totalPartial": 1711,
  "profilesSynced": 1711,
  "contactsSynced": 1711,
  "messagesSynced": 1711,
  "totalFull": 10,
  "fullSynced": 10
}

Unstuck EBT status:

{
  "id": "@MI0aKQls1HIrZlyl4qSAW4ErLqb4xVUN+diSbG0j7Fc=.ed25519",
  "seq": 48,
  "peers": {
    "@lbocEWqF2Fg6WMYLgmfYvqJlMfL7hiqVAV6ANjHWNw8=.ed25519": {
      "seq": 48,
      "ts": 1614865022736
    }
  }
}

KyleMaas avatar Mar 04 '21 13:03 KyleMaas

Don't think I have seen that. One thing you could try is to enable EBT debug here. It can be a bit spammy, but maybe that will help figure out what is going on.

arj03 avatar Mar 04 '21 19:03 arj03