webtorrent-hybrid icon indicating copy to clipboard operation
webtorrent-hybrid copied to clipboard

webtorrent-hybrid seed for several seconds and stop

Open Danorcohen opened this issue 7 years ago • 27 comments

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 avatar Apr 27 '17 00:04 Danorcohen

Nothing?

Danorcohen avatar May 03 '17 15:05 Danorcohen

I have this problem too.

savely-krasovsky avatar Jul 18 '17 23:07 savely-krasovsky

Hi,

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

wattazoum avatar Aug 04 '17 14:08 wattazoum

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

myotavietnam avatar Aug 24 '17 13:08 myotavietnam

+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

flimshaw avatar Sep 15 '17 01:09 flimshaw

Same here... just few seeding few seconds

Ciao121 avatar Sep 20 '17 16:09 Ciao121

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

Ciao121 avatar Oct 29 '17 09:10 Ciao121

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

Standaa avatar Apr 12 '18 22:04 Standaa

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

TheFeelTrain avatar May 23 '18 03:05 TheFeelTrain

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

feross avatar May 23 '18 04:05 feross

+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 ?

DhavalW avatar Jun 14 '19 17:06 DhavalW

👍 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.

sebastienvercammen avatar Mar 26 '20 04:03 sebastienvercammen

@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 :)

feross avatar Mar 26 '20 21:03 feross

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

sebastienvercammen avatar Mar 26 '20 21:03 sebastienvercammen

@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.

Weedshaker avatar May 26 '20 08:05 Weedshaker

Update: I put the --verbose flag and it has been seeding for over a day. I am going to let you know once it fails. Until then you can keep track of my test at: https://peerweb.site/#magnet:?xt=urn:btih:123646487058d49b7d25d59842cd04862eee8822&dn=peerWebSite.txt&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&tr=wss%3A%2F%2Ftracker.fastcast.nz

Weedshaker avatar May 27 '20 10:05 Weedshaker

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.

sebastienvercammen avatar May 27 '20 11:05 sebastienvercammen

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.

Weedshaker avatar Jun 03 '20 09:06 Weedshaker

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

sebastienvercammen avatar Jun 09 '20 16:06 sebastienvercammen

@sebastienvercammen StIll Up and running.

Weedshaker avatar Jun 10 '20 17:06 Weedshaker

Has this issue been resolved?

feross avatar Nov 03 '20 19:11 feross

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

Weedshaker avatar Nov 05 '20 07:11 Weedshaker

I am now seeding this page: https://peerweb.site/#magnet:?xt=urn:btih:682fc456c6e9d1cb848efe6178fe5f0c26c210fc&dn=peerWebSite.txt&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com

I am going to check back and see if it will keep seeding.

Weedshaker avatar Nov 05 '20 13:11 Weedshaker

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 avatar Nov 06 '20 15:11 Weedshaker

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 avatar Nov 06 '20 15:11 Weedshaker

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

Weedshaker avatar Nov 06 '20 15:11 Weedshaker

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.

feross avatar Nov 09 '20 21:11 feross