-
Notifications
You must be signed in to change notification settings - Fork 1.2k
libp2p-webrtc-star + bitswap throws TypeError: Message too large (can send a maximum of 65536 bytes) #2161
Comments
@dirkmc - As mentioned earlier in my comments on your garbage collection PR, I'm implementing a video streaming application. Unfortunately the transfer rate between WebRTC peers - even on a LAN - ends up being really slow, often dropping to double digit Kbps despite direct connections between peers with all of the blocks. I'm wondering if this bitswap error is to blame? I'm still learning pull-streams so I can't identify where the relevant chunking occurs. As always, thanks for your awesome work and let me know if there's anything I can do to assist. |
I wonder if it's coming from this? muaz-khan/RTCMultiConnection#606 |
@vasco-santos do you think the above error may be coming from js-libp2p-webrtc-star? |
I haven't seen a similar error before, but taking into account the setup description I would say that it may come from the However, according to the fiddle that @wehriam provided the If the problem persists, it will probably be easier to debug. If not, the problem is in the connection with a go node. |
@jacobheun is it possible this is being caused because js-mplex does not break up a large message into smaller chunks? (as you mentioned in libp2p/specs#118 (comment)) |
I don't think so, the 1MB mplex limit shouldn't cause an issue since it's significantly larger than the 64kb wrtc limit. If chunking is working fine for direct wrtc connections perhaps there's an issue changing transports (reading over the websocket connection and writing over webrtc). I'd assume this would be fine, but maybe there's an edge case there that bitswap is exposing. |
This application does use PubSub extensively, although the messages should be individually much smaller than 65536 bytes. Are PubSub messages batched at some point and sent without chunking? |
Still seeing this issue in 36.3.
Logging the failed chunk didn't provide much, but might be meaningful to someone in the know: |
Since the error is coming from bitswap it shouldn't be related to pubsub. My assumption is that when bitswap starts to sharing blocks simple-peer is buffering up the 64k max, and then something else is getting tacked on before sending which would cause RTC to throw the error. Or there is a bug causing the simple-peer buffering and back-pressure to fail. I am hoping to start spending more time on the webrtc setup over the next couple of weeks and get it added to js-ipfs as a default transport, but I may not get to this bug until the latter part of that time frame. |
go-ipfs version 0.4.20. I've only seen it in Chrome up to this point. It seems to be intermittent, then happen 10+ times in short succession.
Great news, and apologies if I come across as persistent. JS-IPFS is a tremendous project and I'm anxious to see and use it at it's full potential. |
js-ipfs is being deprecated in favor of Helia. You can learn more about this deprecation and read the migration guide. Please feel to reopen with any comments by 2023-06-02. We will do a final pass on reopened issues afterwards (see #4336). This issue is most likely resolved in the latest Helia version, please try it out! |
Version:
Platform:
Subsystem:
Type:
Severity:
Description:
When sharing a series of files (an HLS video stream) among a single go-ipfs host and 2+ js-ipfs clients, simple-peer reports that messages are too large.
Steps to reproduce the error:
I have been unable to reproduce this outside of my test environment. I have attempted to reproduce at https://jsfiddle.net/dqzouyj1/2/
The text was updated successfully, but these errors were encountered: