flood icon indicating copy to clipboard operation
flood copied to clipboard

Add option to load torrents from rtorrent's filesystem to surpass RPC filesize limits

Open bootldrDNB opened this issue 6 years ago • 9 comments

Type: Bug Report

  • [x] Try to follow the update procedure described in the README and try again before opening this issue.
  • [x] Please check the F.A.Q..
  • [x] Please check the Troubleshooting wiki section.

Your Environment

Version used: a6771ee06373519a5fcff3d234b0d2332ac6a8f0. Node.js version: 10.1.0 npm version: 5.6.0 Web browser: Chromium 63

Client: Windows 10 Server: Ubuntu 18.04 / Alpine 3.7 - rtorrent 0.9.7.

Summary / Current Behavior

Once a file too large for XMLRPC has been attempted uploaded to Flood - Flood responds with a HTTP 500 error, the UI becomes unresponsive and no longer accepts torrent files.

Modifying network.xmlrpc.size_limit.set in rtorrent.rc didn't do anything for me.

Trace: { Error: read ECONNRESET
    at _errnoException (util.js:992:11)
    at TCP.onread (net.js:618:25) code: 'ECONNRESET', errno: 'ECONNRESET', syscall: 'read' }
    at /home/bootldr/tools/flood/server/util/ajaxUtil.js:6:19
    at ClientRequest.fileRequest.onComplete [as onCompleteFn] (/home/bootldr/tools/flood/server/models/client.js:44:11)
    at ClientRequest.handleError (/home/bootldr/tools/flood/server/models/ClientRequest.js:85:12)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:188:7)

Expected Behavior

Flood should tell you that the file is too large for XMLRPC, and the UI should continue to be responsive.

Possible Solution

Load larger files like ruTorrent does.

Steps to Reproduce

Add torrent file larger than 1.5MB to Flood, if you don't have one at hand, try this.

bootldrDNB avatar Nov 19 '18 23:11 bootldrDNB

I tried the file but I get a different error:

Trace: Error creating directory. { Error: EACCES: permission denied, mkdir '/media' errno: -13, code: 'EACCES', syscall: 'mkdir', path: '/media' }

Even though the /media path is used for all my torrent and other ones add without a problem. Or is this a different issue because smaller torrents seem to add fine

Kiina avatar Nov 25 '18 01:11 Kiina

Hello, I have exactly the same issue as the author, is there any fix or workaround ?

itzwam avatar Nov 25 '18 20:11 itzwam

I, too, ran into this issue. Attempted to upload a 1.7MB .torrent file and the status of "Add Torrent" just hung, no error, just spinning indefinitely. I could then not upload any torrent files, regardless of size.

dthomas53 avatar Dec 10 '18 17:12 dthomas53

Hello, I confirm the bug with commit 8d6e88c. I try with rtorrent on remote. The torrent file is never sent to the xmlrpc endpoint.

bigzbigz avatar Feb 09 '19 08:02 bigzbigz

Same here . Watch folder doesn't work either .

ghost avatar Feb 18 '19 18:02 ghost

This is not a bug of flood but rtorrent. rtorrent limit max SCGI content size to 2M in the code. We can fix this by rebuild a rtorrent with lager SCGI content size limitation. More info refer to this issue

xiayyu avatar May 28 '19 05:05 xiayyu

I am actually having a lot of problems on a new machine with rTorrent and Flood. The UI seems to completely lock up on uploading certain torrents. Hope it's related to this problem.

joydashy avatar Jun 02 '19 18:06 joydashy

@xiayyu is correct, this is a limitation of using the XML-RPC protocol. As OP suggested, it might be possible to instruct rTorrent to use the load command, to load from the filesystem, so I'll treat this issue as a feature request for that.

@joydashy That does not sound related to this, can you DM me some example torrents on Discord and I'll try to reproduce?

jfurrow avatar Jun 02 '19 23:06 jfurrow

I can confirm that increasing the max_content_size in scgi_task.h file from the rtorrent source and compiling it does indeed fix this issue. I can now drag and drop larger then 2MB torrent files. It's not a great work around, but it works for though who are willing to compile from source. (or find a docker image that has done it)

runaroundhome avatar Nov 14 '19 23:11 runaroundhome