Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign upVery slow fetching of metadata #1602
Comments
This comment has been minimized.
This comment has been minimized.
|
Have you tried to use the 'metadata' event instead of logging directly in the 'add' callback ? Did you use a private tracker or the default 3 ws trackers ? |
This comment has been minimized.
This comment has been minimized.
|
I have tried that. The slowness happens before the "metadata" event gets logged. I've been using the default trackers. Maybe I should conclude that they are just slow at times and plan to use private trackers? I think my same code was working quickly a couple weeks ago, although I am not 100% sure that it wasn't something I changed somewhere. |
This comment has been minimized.
This comment has been minimized.
|
Well, I set up my own tracker and it is just much, much faster than using the default trackers. Subsecond response vs a couple minutes. I guess they are either overloaded or deprioritizing me for some unknown reason. Thanks for the suggestions @Fabiencdp |
Using:
webtorrent@0.103.0
Ubuntu 18.04.2 LTS
Node v8.10.0
I have two node.js programs. One seeds a small webtorrent and another downloads it. The confusing part is that the
client.addcallback takes a pretty long time, about two minutes. My understanding is that that callback happens after metadata is fetched, so it seems like it is being very slow to fetch metadata.The seeder program:
The downloader program:
When I run these, about two minutes go by. Then I see the seeder log "connected to peer" and the downloader log "torrent metadata is ready", and then almost instantly the download completes (because it's pretty small, like 6kb).
What could be going wrong here, or how should I be debugging?