Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

archiver overloads and restarts protect app. #68

Open
cooper7692 opened this issue Oct 4, 2021 · 1 comment
Open

archiver overloads and restarts protect app. #68

cooper7692 opened this issue Oct 4, 2021 · 1 comment

Comments

@cooper7692
Copy link

cloudkeygen2+ fw.ver. 2.1.11
latest unifi protect vers. 1.19.2

not sure why its doing this tbh.

rllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='192.168.1.200', port=443): Read timed out. (read timeout=60.0)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/usr/local/lib/python3.8/site-packages/protect_archiver/downloader/download_file.py", line 31, in download_file

response = requests.get(

File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 76, in get

return request('get', url, params=params, **kwargs)

File "/usr/local/lib/python3.8/site-packages/requests/api.py", line 61, in request

return session.request(method=method, url=url, **kwargs)

File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 542, in request

resp = self.send(prep, **send_kwargs)

File "/usr/local/lib/python3.8/site-packages/requests/sessions.py", line 655, in send

r = adapter.send(request, **kwargs)

File "/usr/local/lib/python3.8/site-packages/requests/adapters.py", line 529, in send

raise ReadTimeout(e, request=request)

requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='192.168.1.200', port=443): Read timed out. (read timeout=60.0)

Retrying in 3 second(s)...

@danielfernau
Copy link
Owner

Hi there!

Last time this has happened to me was while testing my tool against a much older version of Protect... thanks for reporting.

I suspect this is caused by either an API error or by accessing a 'broken' file; but in general you're right with the assumption that the interaction itself is what causes the crash/restart of the Protect service. This has happened to me in the past even when using the official app on iOS or the web interface.

You can try adding --download-request-timeout=300, where 300 is the number of seconds an individual file download waits before returning 'Read timed out'. That way the Protect server has a bit of time to restart before the tool considers the download to be unsuccessful.
If that doesn't work as expected for you, you can also try using the --ignore-failed-downloads flag which basically tells the tool to ignore all files/segments it can't download while still processing all the other clips.

Hope this helps, feel free to reach out if you need additional assistance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants