Skip to content
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

webtorrent-hybrid seed for several seconds and stop #67

Open
Danorcohen opened this issue Apr 27, 2017 · 27 comments
Open

webtorrent-hybrid seed for several seconds and stop #67

Danorcohen opened this issue Apr 27, 2017 · 27 comments
Labels

Comments

@Danorcohen
Copy link

Danorcohen commented Apr 27, 2017

Hi,

I tried to seed an mp4 file (800M) with webtorrent-hybrid or webtorrent-hybrid-cli and to watch it with Webtorrent video player (such as instant.io). The web player shows that it start downloading from one peer (my server) and the server (webtorrent-hybrid-cli) shows that the client is downloading for several seconds... then the speed decreaces and eventually stops.. then, after a minute or two, it starts to download again for several seconds and stops again... and in the several seconds that it works the download speed is 300kB/s max...

According to Speedtest, in the server side the download rate is 480Mbit/s and upload rate 95Mbit/s
In the client side the download rate is 42Mbit/s and upload rate 3Mbit/s

What is the problem?

@Danorcohen
Copy link
Author

Nothing?

@savely-krasovsky
Copy link

I have this problem too.

@wattazoum
Copy link

Hi,

I confirm this problem on my server. I thought it was a firewall issue, but it happens even after stopping the firewall.

@myotavietnam
Copy link

myotavietnam commented Aug 24, 2017

I have same problem , Destop verson too ( webpeer not work )
Webtorrent still need many improvements for smooth operation

@flimshaw
Copy link

flimshaw commented Sep 15, 2017

+1 also having this issue, connections are initiated and run briefly, but aren't maintained. No idea how useful this is, but left side is webtorrent-hybrid attempting to download on a raspberry pi. Right side is webtorrent-hybrid seeing from os-x. Both are on the same network and subnet, start up and connect immediately and transfer at around 1MB/s for a few seconds, and then crash. The connection tends to restart every 30-60 seconds for a while before halting indefinitely.
screen shot 2017-09-14 at 9 34 21 pm

@Ciao121
Copy link

Ciao121 commented Sep 20, 2017

Same here... just few seeding few seconds

@Ciao121
Copy link

Ciao121 commented Oct 29, 2017

Anybody found a solution or a workaround to this? I'm really going mad trying to understand where the problem is...

@Standaa
Copy link

Standaa commented Apr 12, 2018

Same problem here, running webtorrent-hybrid in node on a mac. Starts and then hangs after a couple seconds.

@TheFeelTrain
Copy link

I have the same problem with both webtorrent and webtorrent-hybrid.

I want to be able to keep seeding a file that is already downloaded but it only lasts for about 5 seconds. Is there anyway to do the equivalent of the --keep-seeding flag through the API? @feross

@feross
Copy link
Member

feross commented May 23, 2018

@TheFeelTrain The API automatically continues seeding, you don't need to pass any special flag.

@DhavalW
Copy link

DhavalW commented Jun 14, 2019

+1.
Been a year. No updates ?
doesn't hang. but doesn't continue seeding either - at least not to the browser.

Made a browser process + node process download (& then auto seed ?) the same torrent. Torrent does become available successfully. But once I kill the browser process, after a while the torrent isn't available anymore to any new browser process, despite node process staying active all through out without any errors.

I also confirmed that the node process did not hang, because the code i put into node for remotely managing torrents, still runs fine & deletes the the torrent when instructed.

Is this expected behaviour ?

@sebastienvercammen
Copy link

sebastienvercammen commented Mar 26, 2020

👍 Similar problem, using webtorrent-hybrid via CLI.

Same result as @flimshaw.

I looked through the code and noticed webtorrent/webtorrent-hybrid only sets an RTC global that later gets "picked up" (referenced via the same global scope, there is no intermediary code) by webtorrent/webtorrent, so there's not much code in this repo that can break.

The underlying code is webtorrent-cli + webtorrent (via require()).

@feross Before outsiders have to jump in blind & deep, do you have any thoughts on what the cause might be? I'm up for fixing it, just hoping to save some time off debugging someone else's code.

@feross
Copy link
Member

feross commented Mar 26, 2020

@sebastienvercammen I suspect there's a bug in webtorrent itself that causes seeding to stop after some time. I think it will be a bit tricky, but not impossible to track down. Please ping me if you track it down and have a PR that fixes it :)

@sebastienvercammen
Copy link

@feross Thanks for jumping in. Will do. :)

@Weedshaker
Copy link

Weedshaker commented May 26, 2020

@feross , I got the same issue after seeding for 7/8 hours from my raspberry-pi. Then the terminal freezes and the torrent is unavailable. Also I tried the cli versions on other devices as well as the Webtorrent Desktop on Windows and Ubuntu, similar issues arose and sometimes even failing faster. But they all fail after some time, while I hoped that they would keep seeding permanently.

Screenshot at 2020-05-26 10-17-14
Test description at: https://github.com/Weedshaker/PeerWebSite#Tests

Is there a way, flag to get a log, because I think there is some error which stops nodejs execution.
PS: I am now trying to get some output with --verbose, gonna post my findings asap.

@sebastienvercammen
Copy link

sebastienvercammen commented May 27, 2020

Thanks for the additions @Weedshaker.

I've been too busy to work on this, but I'm planning to make time soon to get this sorted. I'm following the updates and they're appreciated.

@Weedshaker
Copy link

Until yesterday the test stood strong -> seeding. I can't really tell if the difference was the --verbose flag or that I ran an instant of transmission parallel (although transmission has no active upload stats received) or that I kept the above link open on chromium on the raspberry-pi. Although, the former usually stops seeding after the browser becomes idle. Anyhow, yesterday I had to reboot my raspberry-pi and I only started the webtorrent hybrid cli for the three torrents described in my test. The terminal froze and seeding stopped after less than 12 hours.

I restarted the test today. Again with a browser open and transmission in the background. I will see if I can reproduce it to stay seeding for long.

@sebastienvercammen
Copy link

@Weedshaker Any update on the second test with --verbose? Any logs that hint at the problem?

@Weedshaker
Copy link

@sebastienvercammen StIll Up and running.

@feross
Copy link
Member

feross commented Nov 3, 2020

Has this issue been resolved?

@feross feross added the bug label Nov 3, 2020
@Weedshaker
Copy link

I am going to run a test from today and let you know.

@Weedshaker
Copy link

Weedshaker commented Nov 6, 2020

The page and for that reason the torrent, which I am still seeding according to the WebTorrent Desktop UI on my computer, is now not reachable anymore. It is also not reachable from https://instant.io/#682fc456c6e9d1cb848efe6178fe5f0c26c210fc

@Weedshaker
Copy link

Check box seeding had no effect. But once I did restart the WebTorrent Desktop, it would be seeding and available again. I had the same issue with hybrid, since this is under the hood of WebTorrent Desktop.

@Weedshaker
Copy link

Weedshaker commented Nov 6, 2020

It just went offline again and these were the logs which happened between seeding and failing:

webtorrent: got wt-progress
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseEnter []
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseLeave []
22C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-progress
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\controllers\torrent-controller.js:41 warning for torrent 1: connection error to wss://tracker.btorrent.xyz
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-warning
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\controllers\torrent-controller.js:41 warning for torrent 2: connection error to wss://tracker.btorrent.xyz
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-warning
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\controllers\torrent-controller.js:41 warning for torrent 1: connection error to wss://tracker.btorrent.xyz
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-warning
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\controllers\torrent-controller.js:41 warning for torrent 2: connection error to wss://tracker.btorrent.xyz
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-warning
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseEnter []
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseLeave []
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-progress
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseEnter []
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:347 dispatch: mediaControlsMouseLeave []
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\controllers\torrent-controller.js:41 warning for torrent 1: connection error to wss://tracker.btorrent.xyz
C:\Users\weeds\AppData\Local\WebTorrent\app-0.24.0\resources\app.asar\build\renderer\main.js:363 webtorrent: got wt-warning

@feross
Copy link
Member

feross commented Nov 9, 2020

Thanks for sharing @Weedshaker. Two possibilities come to mind:

  1. Connection to the tracker is lost and webtorrent doesn't re-establish it for some reason, or

  2. All the trackers for the given torrent have gone offline for some reason (maybe wss://tracker.btorrent.xyz was the last one online) and for that reason no peer introductions can happen.

In the first case, that would be a bug in webtorrent. In the second, it wouldn't.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests