excludarr icon indicating copy to clipboard operation
excludarr copied to clipboard

Sometimes hangs and never finishes

Open Tailslide opened this issue 2 years ago • 4 comments

Describe the bug I have excludarr set to run daily and sometimes it never finishes, just hangs forever

image

To Reproduce Steps to reproduce the behavior:

  • Sporadic doesn't happen every time I run
docker run  --rm --pull=always --label=com.centurylinklabs.watchtower.enable=false  --env-file excludarr.env haijeploeg/excludarr:latest --debug radarr exclude -a delete -y -e

env file:

GENERAL_FAST_SEARCH=true
GENERAL_LOCALE=en_CA
GENERAL_PROVIDERS=netflix, amazon prime video
RADARR_URL=http://MYURL:7878
RADARR_API_KEY=MYKEY
RADARR_VERIFY_SSL=false

Expected behavior Program always finishes or exits with error if there is an error

Versions

  1. OS Version: docker
  2. Excludarr version: V1.0.6
  3. Python version: 3.10.2

Debug logging lg.txt

If the output is too long, please paste the output to pastebin or github gist and link it in this issue.

Additional context ps command from inside container:

image

Tailslide avatar Mar 01 '22 22:03 Tailslide

Hi, thanks for your issue! I noticed this also a few times, this seems to happen when JustWatch has problems replying. I am not sure why the timeout in the code is not being triggered. For now the solution is to just cancel the run and try it again when JustWatch is fully responding again.

I will try to figure out why it is not triggering a timeout.

haijeploeg avatar Mar 04 '22 13:03 haijeploeg

Here's my workaround maybe it will help someone else:

CONTAINER_NAME=$(uuidgen)
(sleep 28800 ; sudo docker stop $CONTAINER_NAME)& docker run  --rm --name $CONTAINER_NAME --pull=always --label=com.centurylinklabs.watchtower.enable=false  --env-file excludarr.env haijeploeg/excludarr:latest --debug radarr exclude -a delete -y -e

Tailslide avatar Mar 04 '22 15:03 Tailslide

Quick look at the code I don't see any timeout set maybe I'm just not seeing it?

"By default, requests do not time out unless a timeout value is set explicitly. Without a timeout, your code may hang for minutes or more."

https://stackoverflow.com/questions/45267003/python-requests-hanging-freezing

Tailslide avatar Mar 04 '22 16:03 Tailslide

Oh you are right! I thought request had by default a timeout value of 30 seconds. I will adjust this next week. Lately I don't have a lot of spare time to spend on this project, will pick it up as soon as possible!

haijeploeg avatar Mar 06 '22 14:03 haijeploeg