supervisor: Large file uploads via ingress fail with "Maximum request body size 16777216 exceeded"
Describe the issue you are experiencing
First of all: I am sorry if this might be the wrong HA repository for this bug report as I am not sure if this is an issue in the supervisor or frontend, but I am trying to file it here first.
As said in the subject of this issue, large file uploads of files > 16MB are currently not possible if they are routed via ingress. In fact, third party add-ons like RaspberryMatic or OctoPrint, etc. already faced this issue because their web interfaces have file upload capabilities to allow to upload files (e.g. backups, data, etc.), but as soon as their web interfaces are accessed via ingress these requests fail with common 413 Request Entity is too large responses to their POST requests.
See here: https://github.com/jens-maus/RaspberryMatic/issues/1294 https://community.home-assistant.io/t/repository-octoprint/22883/101
As soon as the web server of these addons are directly accessed outside the common home assistant web interface (e.g. by using direct port mapping in the add-on settings), thus without ingress routing these requests, file upload succeed correctly for file sizes > 16MB.
However, it still is highly desirable to allow for POST requests (e.g. file uploads) via ingress to succeed even for sizes > 16MB. E.g., for the RaspberryMatic addon users have to upload backup data which could easily succeed sizes > 500MB, thus would prevent any ingress use.
What is the used version of the Supervisor?
supervisor-2021.05.4
What type of installation are you running?
Home Assistant OS
Which operating system are you running on?
Home Assistant Operating System
What is the version of your installed operating system?
6.0
What version of Home Assistant Core is installed?
core-2021.6.3
Steps to reproduce the issue
- Install one of the third-party HA add-ons (RaspberryMatic, OctoPrint)
- Use their file upload capabilities to try to upload files > 16MB in size
- Note that POST requests with sizes > 16Mb fail with a
413 Request Entity is too largerequest status - Note that the response of the request is cancelled with a
Maximum request body size 16777216 exceeded, actual body size 16778032message by ingress.
Anything in the Supervisor logs that might be useful for us?
no error/warnings logged upon the error event.
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 30 (12 by maintainers)
Commits related to this issue
- added "ingress_stream" option to HA addon config as this seems to allow large file uploads > 16MB. This refs #1294 and https://github.com/home-assistant/supervisor/issues/2950 — committed to jens-maus/RaspberryMatic by jens-maus 3 years ago
- added a specific "Content-Length" header check to lighttpd.conf which will allow http post/put requests with "transfer-encoding: chunked" to be processed correctly. This seems to finally allow to use ... — committed to jens-maus/RaspberryMatic by jens-maus 3 years ago
not needed https://twitter.com/ludeeus/status/1408482177600397318
core-2021.7.0, su-2021.06.7