Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#3070 closed Bug (fixed)

blocklist-update via RPC doesn't work because the timeout interval is too low

Reported by: presterjohn73 Owned by: charles
Priority: Normal Milestone: 1.93
Component: Daemon Version: 1.92
Severity: Normal Keywords: blocklist update timeout daemon remote
Cc:

Description

The transmission-remote option --blocklist-update takes longer than the 60 seconds introduced in [8044] to complete on my slow-ish server and therefore times out.

Would it be possible to make the timeout configurable and/or introduce a transmission-remote command line option to override it?

Attachments (1)

blocklist-update-timeout.patch (1.4 KB) - added by presterjohn73 8 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 8 years ago by charles

Maybe the blocklist-update RPC command should just return as soon as the update's been queued? I don't see much benefit in waiting for the actual blocklist to finish downloading before returning a response to transmission-remote.

comment:2 Changed 8 years ago by charles

  • Milestone changed from None Set to 2.00
  • Owner set to charles
  • Severity changed from Normal to Minor
  • Status changed from new to assigned

I like the idea of making the RPC function nonblocking, but that raises the question of backwards compatibility for all the RPC clients. Maybe the simplest answer is to just raise transmission-remote's timeout to an interval higher than that in libtransmission/web.c.

comment:3 Changed 8 years ago by charles

  • Resolution set to fixed
  • Status changed from assigned to closed

Fixed in trunk for 2.00 by r10416

Changed 8 years ago by presterjohn73

comment:4 Changed 8 years ago by presterjohn73

Hi,

With all due respect (big :)), I do not think that setting a blanket 5 minute timeout is the best solution as most operations would not take anywhere near that long (IME, anyway).

Having had the time to poke around the code, I could not see a more elegant way of achieving what I wanted, but attached is a patch which sets the timeout to 300 seconds if --blocklist-update is set, but leaves it at 60 seconds if it is not with about as minimal interference on other ops as possible.

Cheers!

comment:5 Changed 8 years ago by presterjohn73

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Version changed from 1.91 to 1.92

more... This is against 1.92 now.

comment:6 Changed 8 years ago by charles

  • Keywords backport-1.9x added
  • Resolution set to fixed
  • Status changed from reopened to closed

variant of that patch is applied to trunk for 2.00 by r10431

comment:7 Changed 8 years ago by charles

  • Keywords backport-1.9x removed
  • Milestone changed from 2.00 to 1.93

backported to 1.9x by r10582

comment:8 Changed 8 years ago by charles

  • Severity changed from Minor to Normal
  • Summary changed from --blocklist-update timeout to blocklist-update via RPC doesn't work because the timeout interval is too low
Note: See TracTickets for help on using tickets.