-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
OTA and upload of larger files fails #9990
Comments
…t() (#457) Fixes: espressif#9990 Co-authored-by: TD-er <[email protected]>
…t() (#459) Fixes: espressif#9990 Co-authored-by: TD-er <[email protected]>
I did a few tests with my PR and it does for sure solve the 10+ minutes hanging, but OTA updating with files > 2MB still often fail. Maybe someone else has some idea why OTA'ing of large files is now hardly working where it used to work just fine. |
Hmm this issue is even bigger... |
I think I found the remaining issue. After changing this, the OTA update was working just fine. |
Board
Any with large enough flash
Device Description
This is about larger uploads of either the sketch, or file to the filesystem.
So any board with large enough flash to have an upload of files > 2 MB
Hardware Configuration
Version
latest master (checkout manually)
IDE Name
PlatformIO
Operating System
Windows 11
Flash frequency
40MHz
PSRAM enabled
yes
Upload speed
115200
Description
OTA updates of larger sketches (typically > 2 MB in size) lately tend to fail.
The device then is inaccessible for 10 - 15 minutes.
On the serial console, you'll see the dots per 1436 bytes of upload and they typically stop at 1100 - 1600 dots.
Thus somewhere between 1.4 - 2.2 MB and never seem to make it to the full 2.5 MB needed for my "max" build bin files.
I found 2 issues here.
This function does no longer have a timeout implemented:
arduino-esp32/libraries/WebServer/src/Parsing.cpp
Lines 346 to 358 in 4e3523c
Related issue: #9163
Related PR: https://github.com/espressif/arduino-esp32/pull/9167/files
IMHO the old implementation of this function was just fine:
(of course needs to have
NetworkClient
as function argument now)The other issue is in
WebServer::handleClient()
:arduino-esp32/libraries/WebServer/src/WebServer.cpp
Lines 432 to 440 in 4e3523c
setTimeout
should be called before_parseRequest
I'm not 100% sure this is all that's needed to make OTA uploads work in all situations again.
But at least with these changes I managed to get the OTA working again on the 2nd attempt where it was nearly impossible before these changes.
Also it is nice the board will remain accessible and not hang for 10+ minutes in that
_uploadReadByte
function :)Sketch
Debug Message
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
The text was updated successfully, but these errors were encountered: