Page 2 of 2

Re: Abusive WebSocket test getting an Exception

PostPosted: Tue Mar 15, 2022 9:52 am
by Inq720
In the hopes that more information might trigger someone with experience with this...

During an upgrade to my WebSocket layer, I have been able to get a throughput upgrade. I can now send 50 byte messages at 1000 Hz to four clients => A server throughput of 200KB/sec.

What I found during abusive testing was that it is sensitive to connection strength. No big surprise there as far as throughput, but NOT for getting an Exception.

  • The above numbers were achieved on a desktop with antennas about two feet away from each other and they were connected directly to each other using a SoftAP connection. No data loss occurred overnight sending over 5GB. Still running without Exceptions.
  • On a separate laptop, still using SoftAP and with the ESP8266 about two feet away, I could not run it over 100 Hz without getting lost data. And after about a couple hours of this and about 1GB of data transfer, it exceptioned.

Here hoping this rings a bell.

Re: Abusive WebSocket test getting an Exception

PostPosted: Tue May 24, 2022 9:17 am
by eriksl
My $0.02

I have been running ESP's with software updates very frequently (large chunks of data, > 500 kb) and also I have been testing with much larger chunks of dummy data and I never had CPU exceptions. So it is possible.

The first thing I could recommend is to get rid of the espconn functions, they're written terribly badly and I could imagine they're the cause of an exception every now and then.

What I also did is compile the lwip library myself. The version of Espressif (again) has some quirks that may be the cause of exceptions.

Last but not least: avoid malloc and the Espressif implementations (*vPort*). I have been using them for some time and I got unexplained crashes and exceptions. Considered the general quality of coding by Espressif I wasn't surprised. So I returned to static allocation, problem solved.