DobyTang / LazyLibrarian

This project isn't finished yet. Goal is to create a SickBeard, CouchPotato, Headphones-like application for ebooks. Headphones is used as a base, so there are still a lot of references to it.
732 stars 70 forks source link

Timeout querying Jackett /all API #1471

Closed derekoharrow closed 6 years ago

derekoharrow commented 6 years ago

I'm trying to configure LL to use the "/all" API for Jackett. I've setup a Torznab entry with the URL as http://docker.lan:9108/torznab/all and the correct Jackett API key.

This is working fine in sonarr/radarr/lidarr, so the Jackett API call seems to be fine.

When I configure this in LL and then run a test, LL times-out (see error below). Is it possible to increase the timeout for the LL call to return data?

LazyLibrarian version number (at the bottom of config page)

Repo: https://github.com/dobytang/lazylibrarian : Branch: master : Updated: Fri Jun 15 21:14:49 2018
Current Version: 753687edfce21d95d6c68bc9d69e72d3bc15f118 : Latest Version: 753687edfce21d95d6c68bc9d69e72d3bc15f118

Operating system used (windows, mac, linux, NAS type)

Docker (thraxis/lazylibrarian-calibre)

Interface in use (default, bookstrap)

bookstrap

Which api (Goodreads, GoogleBooks, both)

N/A

Source of your LazyLibrarian installation (git, zip file, 3rd party package)

thraxis/lazylibrarian-calibre

Relevant debug log with api keys and any passwords redacted

LL log:

2018-06-17 16:01:58 | ERROR | fetchURL: Timeout getting response from http://docker.lan:9108/torznab/all/api?q=Agatha%2BChristie&apikey=XXXXXXXXXXXXXXXXXXXXXXXXXXXX&t=search&extended=1
-- | -- | --

Jackett log:

Info | Found 425 releases from AggregateSearch for: Agatha+Christie
-- | --
philborman commented 6 years ago

That looks like a new call, I didn't think jackett did an "all" option. Cardigann always did, and it runs concurrent searches so you start to get results fairly quickly. I had a quick play and it seems jackett doesn't give you anything back until all the results are in. The timeout is currently modifiable in the config file, but not in the web interface. The setting in config.ini is HTTP_TIMEOUT probably set to 30 (value is in seconds)

Try an "all" search from jackett web interface and see how long it takes, depends on who's included in "all", then allow a little more than that time in the config.ini setting. You will need to stop lazylibrarian, alter config.ini, then restart lazylibrarian so it reads the new value. If this fixes the issue let me know what setting you used, and I will look into how easy it would be to add a separate timeout for jackett or ideally just the jackett "all" search (we don't want to slug everything else)

derekoharrow commented 6 years ago

I can't find a config.ini - would that be (on docker) Config/ServerConfig.json? I've also figured-out that it was some stuck feeds that were causing the timeout - Demonoid, Torrentz2 and YIFY. Disabled them and it completes well within the 30 seconds!

derekoharrow commented 6 years ago

Doh! Ignore me - I was looking at the Jackett config, not the LL config. Found it!

philborman commented 6 years ago

New release has two timeouts, HTTP_TIMEOUT for most calls can be kept quite short, maybe 10 to 20? New HTTP_EXT_TIMEOUT is used for any calls containing "aggregate" or "all" as parts of the path, so should pick up cardigann and jackett api calls. Set this to maybe 60 or more?