flood icon indicating copy to clipboard operation
flood copied to clipboard

Handle rtorrent's rejection of large torrent files

Open Jeoffreybauvin opened this issue 7 years ago • 7 comments

Hi,

I just found a big torrent file : 4,3 Mb.

When I'm adding it to Flood, I have this in my javascript console :

POST https://flood_adress/api/client/add-files 413 (Request Entity Too Large)

I can't add it to Flood.

Any idea ?

Jeoffreybauvin avatar Oct 21 '17 15:10 Jeoffreybauvin

Maybe add a bigger value in .rtorrent.rc - network.xmlrpc.size_limit.set

In my config it is 4MB if you add a bigger one and restart rtorrent it will work.

network.xmlrpc.size_limit.set = 4M

mirolm avatar Oct 21 '17 17:10 mirolm

4MB for a torrent meta file is insanely big, btw. What's the piece size?

randomnonsense avatar Oct 21 '17 17:10 randomnonsense

@Jeoffreybauvin please configure rTorrent as @mirolm advised. This is not a bug with Flood, but definitely Flood could handle this error and provide better feedback in the UI. I'll use this ticket to track that and rename it accordingly.

jfurrow avatar Oct 21 '17 18:10 jfurrow

Hi all,

@mirolm Thanks, but with 10M, it's not better : I still have a 413 Request entity too large.

@randomnonsense : Yes, I don't know why : it's a 40 Gb file.

Jeoffreybauvin avatar Oct 21 '17 18:10 Jeoffreybauvin

If you are using flood and nginx then check client_max_body_size parameter in nginx.conf?

Set it to a value for example:

client_max_body_size 16m;

mirolm avatar Oct 23 '17 20:10 mirolm

If you are proxying flood through nginx, don't forget to proxy_max_temp_file_size 0 too, nginx has a hard limit of 1024mb otherwise and you're downloads will fail.

dcousens avatar Oct 23 '17 21:10 dcousens

Same problem with a ~10Mb .torrent file Flood behind Nginx Logs:

POST /api/client/add-files 500 4354.400 ms - 148
MulterError: File too large
     at abortWithCode (/home/rtorrent/flood/node_modules/multer/lib/make-middleware.js:79:22)
     at FileStream.<anonymous> (/home/rtorrent/flood/node_modules/multer/lib/make-middleware.js:141:11)
     at FileStream.emit (events.js:189:13)
     at PartStream.onData (/home/rtorrent/flood/node_modules/busboy/lib/types/multipart.js:220:18)
     at PartStream.emit (events.js:189:13)
     at addChunk (_stream_readable.js:284:12)
     at readableAddChunk (_stream_readable.js:265:11)
     at PartStream.Readable.push (_stream_readable.js:220:10)
     at Dicer._oninfo (/home/rtorrent/flood/node_modules/dicer/lib/Dicer.js:191:36)
     at SBMH.<anonymous> (/home/rtorrent/flood/node_modules/dicer/lib/Dicer.js:127:10)

raphmarot avatar Feb 24 '20 09:02 raphmarot