Trying to load a 80 kB web page but sometimes it is not loading completely.
Sometimes when I reload the page, the source code shows up. Goingo to inpect -> source, only html and css are there. The js script is missing. I am using server.on with SPIFFS and servestatic. Does anybody knows how to solve this issue?
This sounds familiar, I had/have similar issues #1330 . You can check if you run out of heap. Another way to save some memory is to sendl files ie your js stuff as a .gz file.
Hi all,
have the same issue here, it's a memory problem... I already tryed the workaround using a chunked response with the same result:
The free heap reduces every call to the callback function by the amount of "maxLen", so I assume the memory wasn't freed:
AsyncWebServerResponse* response = request->beginChunkedResponse(pszType, [request](uint8_t* buffer, size_t maxLen, size_t alreadySent) -> size_t ...
When the CPU runs out of mem, the async TCP lib says:
[ 28094][W][AsyncTCP.cpp:949] _poll(): pcb is NULL
After that everything related to Network hangs (No answer to Ping, or any request), till the watchdog resets the ESP...