-
Notifications
You must be signed in to change notification settings - Fork 1.3k
ERROR: Too many messages queued even if AsyncWebSocket::availableForWriteAll() returns true #1158
Comments
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
I'v the same issue. The Flag of the availableForWriteAll is raised, but never cleared, at least not before the EPS reboots, with a remark that's it dit not received enought love in the Async handling routine. Looks like an interal issue/bug. |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
Same issue here |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
Somewhat related.. |
@AcuarioCat great info. Thanks. How do you increase the memory allocation for queue size? |
The queue size is set in AsyncTCP.cpp, you need to change xQueueCreate from 32 to the size you want. |
I have the same issue. My application basically sends a lot of JSON data (around 30kB/sec divided in 15 packages/sec). It works for a few seconds, heap stays stable and eventually the heap fills and the ESP reboots. This is the backtrace:
|
Using ESPAsyncWebServer streaming https://gist.github.com/me-no-dev/d34fba51a8f059ac559bf62002e61aa3 Indeed changing queue size from 32 to 256 in AsyncTCP.cpp, solves "async_tcp watchdog error" for me : Error
AsyncTCP.cpp OK
Configuration On Windows, AsyncTCP.cpp is located in C:\Users\USER\Documents\Arduino\libraries\AsyncTCP-master\src\AsyncTCP.cpp |
When the AP disconnects, the AP's ESP32 continues to send Socket messages to the queue (this causes overflow).
|
I have the same problem, IDE Arduino 2.1.0 |
Same here. But after observing the behavior on my console, my hunch is that chucking for WL status should solve it. If(WiFi.status() != WL_CONNECTED). |
The Problem is that I send a message every millisecond (or nanoseconds, depends on the esp32 cycle time). I made a timer error in my loop. Editing this line: _async_queue = xQueueCreate(32, sizeof(lwip_event_packet_t *)); cannot change the fact that I have sent to much messages lmao. But the OP has a different problem, I did not use the function he uses. |
…(comment) and me-no-dev/ESPAsyncWebServer#1158 that suggest to increase the number xQueueCreate available in the AsyncTCP.cpp library
I have a lot of data I need to send out via an
AsyncWebSocket
in multiple messages in a loop. So I thought I could wait forAsyncWebSocket::availableForWriteAll()
to return true, then write my data:And while I expected this to wait until all queues have enough space, I am getting "ERROR: Too many messages queued" and even a watchdog timeout:
I am on an ESP32, platformio, ESP Async WebServer 1.2.3, AsyncTCP 1.1.1
The text was updated successfully, but these errors were encountered: