Failed to send a little bit large file. #4438
-
I just copied the full code of your file-sharing example project. I can send a small file like a 1.1 MB file (I have tested). but the problem is I can't send a little bit large file around 25 MB. please go through my code the error occurred : (File Sender terminal)
the error occurred : (File Receiver terminal)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Yes, there is a maximum amount that we will allocate: rust-libp2p/protocols/request-response/src/cbor.rs Lines 55 to 58 in 955da49 This MUST be bounded otherwise you are vulnerable to DoS attacks because the remote can send you random garbage and you allocate 10MB per stream and eventually run out of memory. If you want to transfer large files, you'll need to chunk them somehow. |
Beta Was this translation helpful? Give feedback.
Yes, there is a maximum amount that we will allocate:
rust-libp2p/protocols/request-response/src/cbor.rs
Lines 55 to 58 in 955da49
This MUST be bounded otherwise you are vulnerable to DoS attacks because the remote can send you random garbage and you allocate 10MB per stream and eventually run out of memory. If you want to transfer large files, you'll need to chunk them somehow.