-
-
Notifications
You must be signed in to change notification settings - Fork 33.8k
Increase timeout for snapshot upload #43851
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
Conversation
@@ -89,9 +90,10 @@ async def _command_proxy( | |||
request._client_max_size = ( # pylint: disable=protected-access | |||
MAX_UPLOAD_SIZE | |||
) | |||
client_timeout = 300 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not disable timeout?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could, but then it would never timeout 🤷
worst case you upload 1GB, with 5min it will still timeout if your connection is slower than 29Mb/s.
This should only be done in a local network, I think that is a reasonable max value?
But if you feel we should have None
(disabled) I can update it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is this timeout only for the uploading, or also the processing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the upload, and only the first part of the upload (between the client (browser) and HA).
When that part is done, HA sends this to SU which will process it (save).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe 10min for slow SD?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Writing to SD is not a part of this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess 5 min is ok.
Breaking change
Proposed change
Increases the timeout between the client and HA for snapshot uploads from 10 to 300 seconds.
Fixes the 502 error you get on slower devices that uses > 10s for the upload.
Type of change
Example entry for
configuration.yaml
:# Example configuration.yaml
Additional information
Checklist
black --fast homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
..coveragerc
.The integration reached or maintains the following Integration Quality Scale:
To help with the load of incoming pull requests: