-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connected to peers but no new data #11
Comments
That sounds unusual. You can try putting the env var |
It's so intermittent that I've had trouble debugging it with It looks like SSB-CONN was connecting to a few peers, but after an hour without any new content I tried an |
@christianbundy Do you have in your ssb config In ssb-conn,
Is it so that you were connected with peers, and replication (ssb-replicate) was not happening with them, but a Conclusion: so far I'm still confused by this bug. |
Nope, I've got the default ssb-config.
I was connected to peers, but it didn't seem to be connecting to new peers. My intuition is that the replication is working fine, but that it's not connecting to new peers as often as I'd expect. I was able to use |
Is this behavior noticeably different than what you had before with ssb-gossip? The ssb-conn scheduler mostly follows the legacy scheduler in ssb-gossip. Every 30min, connections to pubs are shut down (and this frees up space for new connections). In general I recommend getting acquainted with the scheduler source code file, it has good comments. |
I'm not sure. Lately I've been experimenting with running Oasis as a daemon instead of starting it when I want to use it, so maybe that's the difference? In the past I'd open Patchwork or Oasis and it'd immediately connect to a bunch of peers, but now I'm opening Oasis after it's been running for 48 hours so it's at a random point in the replication schedule. Maybe I've just been getting unlucky? |
Finally had this happen when I had the debug mode on, so I've got detailed logs. At a first pass I think it happened like this:
Are there any important privacy implications I should be aware of before posting my |
That sequence of events sounds reasonable. Those two peers that were connected but didn't give you new messages: are you sure there were new messages that those peers could give you? In my experience some peers have a slice of the social graph that other peers don't have.
It might show IP addresses and SSB IDs, but usually only IP addresses for pubs. So if you think your logs look fine, I think regarding privacy it should be okay, but on the other hand I'm not 100% sure what your logs show. |
No, I'm not sure which messages they have, and I don't think there's a technical bug in the scheduler. My point is that ten minutes of peering with people who don't have any messages for you seems sub-optimal, and since I bump into this often I'd love to brainstorm why it happens and how to fix it.
Possible solutions off the top of my head:
Maybe you'll have some insight here? I'll attach my logs below in case you find them useful: relevant log from when I resumed my computer from suspend
|
(@dominictarr I'm @ mentioning you in this comment concerning the gossip scheduler and EBT replication. see below) @christianbundy I recommend tweaking the parameters in this function below until you find numbers that satisfy you, then make a PR and we can discuss about whether those parameters would be a good default for all users:
The important detail here is the word staged. It basically means that all (but only up to 5) peers that I follow which are currently in ssb-conn-staging (such as LAN peers or Bluetooth peers, but pubs can also be staged), those we will connect to automatically. I think in your case you had no staged peers, so it didn't connect to 5 of them, just 2, because it followed other logic. See that function source code, it shows it. That said, I also notice that on my side (Patchwork and often Manyverse) I also have just 2 peers connected. Sometimes 3. I think we should aim for most of the time 3 peers, and if there are 2 peers, then actively try to connect to another 3rd one. I think this can be done by just tweaking the numbers in that function. I remember talking with @dominictarr that if EBT is enabled, then peers connections should not be short-lived, so I'm trying to not have too much churn in the scheduler. I could be wrong though. |
Oh, I think that usually it's 1 room plus 1 pub. It should be at least 2 pubs, because a room doesn't count as a replication peer. |
Hi! Not urgent, but this morning I started my computer and checked SSB for messages but I didn't download any new ones. I can confirm that I was connected to a handful of pubs that should have messages for me, but no new messages were being downloaded. Running
ssb conn stop; ssb conn start
seemed to resolve the issue. Anything I can do to help debug the next time this happens?The text was updated successfully, but these errors were encountered: