Beaker: Seems to have trouble connecting to dats after awaking macbook from sleep

Created on 20 Jul 2018  路  19Comments  路  Source: beakerbrowser/beaker

Every time (could be not every, but most of the time) I awake my machine from sleep beaker no longer is able to load any of the dat pages. Restarting a browser is pretty much only way I'm able to fix that and often times I have to kill it as it refuses to quit.

There is a chance that it's related to a change of network I'm connected to as most of the time I close my laptop to go from one location to the other.


Operating system:

macOS: 10.13.6

This is:

  • [x] a bug
  • [ ] general feedback
bug

All 19 comments

I've noticed this as well. There appears to be general degradation of connectivity over time, and sleeping your machine can sometimes exacerbate it. (I've also experienced runaway memory usage after some sleeps, but I've been unable to diagnose as it crashes before I can attach my debugger and capture the heap.)

I've created a new label for this, "connectivity"

I am not quite sure if i struggle with the same issue, but I am also using MacOS, and it seems that Beaker stops to connect to the same IPs over time. I have created a simple js-script which downloads events that have happened in a city with a gap of one minute and then puts this data to dat. But quite often Beaker shows me a version of events that happened at least a day ago (aka shows own cache)

Maybe it will help you to understand why does it happen, because I found one interesting pattern in dat behavior. I realized that actual client version of dat commands working absolutely fine at the same moment as Beaker does not work! If I run "dat clone" or "dat sync", then it downloads latest data as it should be, without any problem. Moreover, if I make "dat sync" at the same time as running Beaker, then Beaker becomes also able to download latest data, because it is now shared also from my local machine with "dat sync"!

@nettiopsu that fits with what I've seen.

Not sure if same issue, but it just keeps loading dats forever (local, remote, or even beaker://library) after some time, even without going through a sleep. Opens https pages as normal. I wasn't using Beaker at the time. Happened several times.

Operating System: Ubuntu 16.04
Beaker version: Compiling from source; always up-to-date. Has been happening for some time now, I think.

@hossameldeen Yes I've noticed this too. Something about the discovery system starts to fail after long execution, and that might explain the sleep having the same effect.

I've also recently noticed that leaving & rejoining the swarm will frequently fail to connect. So, we've clearly got some issues in the discovery network.

I'm starting to highly suspect that the problem has nothing to do with the dat network. Some behaviours noticed:

  • When this happens, all non-HTTP pages don't open, even ones that aren't related to dat like beaker://settings!
  • Actually, it's not that they don't open; it's that there's a _huge_ increase in their loading time. Sometimes I leave them and come back later to find them have loaded (but not always).

I.e., is it really a connectivity problem?

Note#1: I also think this is probably the same as #1057.

Note#2: Currently, when settings page is opened it's a blank page. Probably just a new bug (#1171). That's not what I mean by the settings page not opening.

@hossameldeen does overall performance seem to lag in that case?

@pfrazee My machine is laggy anyway, so can't really tell. But I can open tabs, open google and https websites more or less as normal, while dat:// & beaker:// never load or sometimes load after minutes.

Hope it helps. Thanks for caring!

Hmm okay. Yeah that still suggests a connectivity problem to me, which is separate from our performance issue.

I am now in the situation when Beaker browser does not load my own dat site anymore even after restarting it and reinstalling it. Debug log says "dat-serve Timed out searching for", swarm log is completely empty excepting for "No peers are currently connected for this archive."

dat sync and dat share are working fine at the same time in the same computer. I am able to load dat://beakerbrowser.com, but not my site, which makes me completely confused

UPD: it was solved by cleaning all the history. Dat cache clean up did not help.
UPD2: still struggling with it, it does not find my 2 peers, though they are online and working. But this is another problem, same happens for Windows computer as well

@nettiopsu Can you open another issue for that?

Sure!

Just WOW! I'd honestly given up on using beaker for dats (the irony), but with the latest commit (92af87d191c9613920d4472a192c8ff86fcf122f) everything is running so smoothly (till now).
Sorry for the noise but I had to say that somewhere.

In a less-hyped tone: It's probably too early to say, but currently beaker doesn't exhibit performance problems for me. As one particular example: initial load time was high & laggy, any Saved Tabs that are of dat protocol (even local archives) used to time-out but now they don't. And load time is now negligible.

Many, many thanks!

@hossameldeen nothing changed for me, I tried now the latest version from master

@hossameldeen In latest master, I've reduced the workload at startup so that non-critical data gets loaded over time. It's improved my performance as well!

@nettiopsu Probably because I had "Saved Tabs". Perhaps it's just load time and not overall performance, although it feels like overall performance as well. And I didn't test much enough yet.

But if nothing changed for you at all: something you most probably did but just in case, could you try burnthemall/are you sure you ran npm install? (I know I know, you most probably did that).

If you happen to have some code/reproducible steps you'd like me to try on my Beaker, I'd love to.

@hossameldeen I actually have installed it from scratch to a new folder, even removed all the cache and application data from MacOS (it seems it intersects with the release version). But I do not have problems with the load time, but instead with connectivity and connection timeouts 馃槇

I can try of course burnthemall, but I do not think it can solve the connectivity issue in this case

Yeah, agree my comment is probably unrelated...

A behavior I noticed on 2 machines: When the Internet is unstable, Beaker fails to open dats. Even if the Internet returns to being stable, Beaker keeps failing to open dats till Beaker is restarted.

Was this page helpful?
0 / 5 - 0 ratings