hammering on AsyncWebServer_Teensy41

Hi folks!

I'm using AsyncWebServer_Teensy41 to present a few different server pages, set up very much simplified in the code below (my pages are more dynamic, but this demonstrates a simple case.) I've got some scripts that are reading from these pages asynchronously. I find that they chug along pretty well until I point a browser at it and refresh any one of these pages by hand, then I get a continuous series of errors that wireshark is calling "Continuation" issues.

1709601054215.png


Once the Continuation is seen, my parser on the client complains "Invoke-WebRequest : The server committed a protocol violation. Section=ResponseStatusLine"

Looking at a successful vs. a failed transfer, I notice this: The "HTTP/1.1" is missing from the malformed transfer.


1709600475258.png








1709600625349.png



I've tried setting up the code to use the multiserver approach and it seems a bit better hardened against this, but I can still eventually make it fail.

Am I getting into trouble with multiple open connections? Do I need to close the connection myself? Do I need to somehow gate this transfers on completeness?

Should I drop down into the lwip level and do this all using sockets instead?

Thanks in advance for your questions and suggestions!


C++:
void setup_http()
{
  server.onNotFound(handleNotFound);

  // register a "directory" of available pages to be shown on /
  server.on("/", HTTP_GET, [](AsyncWebServerRequest *request)
            { 
       String html = "Here's my root directory";
    request->send(200, "text/html", html); });

  // register the OTA update page on /firmware: args are (URI, method, onRequest)
  server.on("/firmware", HTTP_GET, [](AsyncWebServerRequest *request)
            {
    String html = "<body><h1>firmware update</h1><br>"
      "<h2>select and send your binary file:</h2><br>"
      "<div><form method='POST' enctype='multipart/form-data' action='/firmware'>"
      "<input type='file' name='file'><button type='submit'>Send</button>"
      "</form></div></body>";
    request->send(200, "text/html", html); });

  server.on("/firmware", HTTP_POST, OTAend, OTA);

  server.on("/data", HTTP_GET, [](AsyncWebServerRequest *request)
            { 
               String html = "Here's my data directory";
    request->send(200, "text/html", html); });

  server.begin();
}
 
A little more information

Code:
[env:teensy41]
platform = teensy
board = teensy41
framework = arduino
lib_deps =
    khoih-prog/AsyncWebServer_Teensy41
    ssilverman/QNEthernet@>=0.17.0
    bblanchon/ArduinoJson@^6.21.4
 
Last edited:
An example of the reading script, this one for powershell. I get the Continuation problem on an ubuntu machine as well. I'll open 3 tabs and set each version of the script to point to the / (root), the /data and the /firmware pages. Then I'll set up different Millisecond delays and start them all at a human-typed scale. Then, going to a browser tab that has, say, the /data url open, I hit refresh a couple times. This causes the error.

Code:
while($true) {
     (Invoke-WebRequest -Uri "http://192.168.2.109/firmware" -Method Get -UseBasicParsing).Content
     Start-Sleep -Milliseconds 500
 }
 
lib_deps = khoih-prog/AsyncWebServer_Teensy41 ssilverman/QNEthernet@>=0.17.0 bblanchon/ArduinoJson@^6.21.4
No complete usable sketch provided.
Above shows the QNEthernet by @shawn is being used.- which is good as it is a good library has active support given a reproducible issue.

It also shows Json in use - unknown how or to what degree - but a recent post had an issue with a found resolution:
 
Thanks Shawn and Defragster.

OK, I owed this community better. I'm providing a usable sketch, straight from SendChunked.ino (pasted at bottom of this post). It provides two ways to access data:
Code:
server.on("/", HTTP_GET, [](AsyncWebServerRequest * request)
server.on("/inline", [](AsyncWebServerRequest * request)

Open a powershell terminal and enter this (using the IP address acquired by DHCP provided from your serial terminal)
Code:
while($true) {
     (Invoke-WebRequest -Uri "http://10.0.0.252/inline" -Method Get -UseBasicParsing).Content
     Start-Sleep -Milliseconds 250
 }

Open another and enter this
Code:
while($true) {
     (Invoke-WebRequest -Uri "http://10.0.0.252/" -Method Get -UseBasicParsing).Content
     Start-Sleep -Milliseconds 500
 }

Get those going, and you should see one terminal repeating "this works as well\r\n" and another showing a heading and 500 line dump of "Teensy41_AsyncWebServer_SendChunked_ABCDEFGHIJKLMNOPQRSTUVWXYZ"

This works well so far. Now, point a browser at 10.0.0.252/inline and hit refresh a few times. You'll start to see the scripts having errors:

Code:
This works as well                                                                      
This works as well                                                                      
Invoke-WebRequest : The server committed a protocol violation.                          
Section=ResponseStatusLine                                                              
At line:2 char:6                                                                        
+     (Invoke-WebRequest -Uri "http://10.0.0.252/inline" -Method Get -U ...            
+      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                    
        + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
        + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand                                                                                                                                                    
This works as well                                                                      
This works as well

Here's what wireshark sees. There's one good GET/response pair then one failed GET/ continuation pair
1709664382124.png


Detail of the good one at line 297:
1709664459988.png


Detail of the failed line at 308, missing the HTTP/1.1
1709664514374.png


If Powershell isn't your cup of tea, I'm sure there's a curl version that we can try. If you'd like me to try that using WSL, I'm game. I could also figure it out if anyone would like to try it with linux. Let me know.

I can also provide the wireshark dump, but I need to be sure I've sanitized it first.

[One last item, I was just able to reproduce this without even bothering to open the terminal to 10.0.0.252/ -- the one that does the large dump. Just open one terminal pinging the "This works well" (10.0.0.252/inline) and open a browser pointing at the same then hit refresh a few times until things start failing. It doesn't take more than 10 seconds or so.]

Many thanks!


C++:
/****************************************************************************************************************************
  Async_AdvancedWebServer_SendChunked.ino

  For Teensy41 with QNEthernet

  AsyncWebServer_Teensy41 is a library for the Teensy41 with QNEthernet

  Based on and modified from ESPAsyncWebServer (https://github.com/me-no-dev/ESPAsyncWebServer)
  Built by Khoi Hoang https://github.com/khoih-prog/AsyncWebServer_Teensy41
  Licensed under GPLv3 license

  Copyright (c) 2015, Majenko Technologies
  All rights reserved.

  Redistribution and use in source and binary forms, with or without modification,
  are permitted provided that the following conditions are met:

  Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

  Redistributions in binary form must reproduce the above copyright notice, this
  list of conditions and the following disclaimer in the documentation and/or
  other materials provided with the distribution.

  Neither the name of Majenko Technologies nor the names of its
  contributors may be used to endorse or promote products derived from
  this software without specific prior written permission.

  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
  ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
  ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *****************************************************************************************************************************/

#if !( defined(CORE_TEENSY) && defined(__IMXRT1062__) && defined(ARDUINO_TEENSY41) )
  #error Only Teensy 4.1 supported
#endif

// Debug Level from 0 to 4
#define _TEENSY41_ASYNC_TCP_LOGLEVEL_       1
#define _AWS_TEENSY41_LOGLEVEL_             4

#define SHIELD_TYPE     "Teensy4.1 QNEthernet"

#if (_AWS_TEENSY41_LOGLEVEL_ > 3)
  #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error
#endif

#define USING_DHCP            true
//#define USING_DHCP            false

#if !USING_DHCP
  // Set the static IP address to use if the DHCP fails to assign
  IPAddress myIP(192, 168, 2, 222);
  IPAddress myNetmask(255, 255, 255, 0);
  IPAddress myGW(192, 168, 2, 1);
  //IPAddress mydnsServer(192, 168, 2, 1);
  IPAddress mydnsServer(8, 8, 8, 8);
#endif

#include "QNEthernet.h"       // https://github.com/ssilverman/QNEthernet
using namespace qindesign::network;

#include <AsyncWebServer_Teensy41.h>

AsyncWebServer    server(80);

int reqCount = 0;                // number of requests received

const int led = 13;

// In bytes
#define STRING_SIZE                    40000

#define BUFFER_SIZE         512
char temp[BUFFER_SIZE];

void handleRoot(AsyncWebServerRequest *request)
{
  digitalWrite(led, 1);

  int sec = millis() / 1000;
  int min = sec / 60;
  int hr = min / 60;
  int day = hr / 24;

  snprintf(temp, BUFFER_SIZE - 1,
           "<html>\
<head>\
<meta http-equiv='refresh' content='5'/>\
<title>AsyncWebServer-%s</title>\
<style>\
body { background-color: #cccccc; font-family: Arial, Helvetica, Sans-Serif; Color: #000088; }\
</style>\
</head>\
<body>\
<h2>Async_AdvancedWebServer_SendChunked !</h2>\
<h3>running on %s</h3>\
<p>Uptime: %d d %02d:%02d:%02d</p>\
<img src=\"/test.svg\" />\
</body>\
</html>", BOARD_NAME, BOARD_NAME, day, hr % 24, min % 60, sec % 60);

  request->send(200, "text/html", temp);

  digitalWrite(led, 0);
}

void handleNotFound(AsyncWebServerRequest *request)
{
  digitalWrite(led, 1);
  String message = "File Not Found\n\n";

  message += "URI: ";
  message += request->url();
  message += "\nMethod: ";
  message += (request->method() == HTTP_GET) ? "GET" : "POST";
  message += "\nArguments: ";
  message += request->args();
  message += "\n";

  for (uint8_t i = 0; i < request->args(); i++)
  {
    message += " " + request->argName(i) + ": " + request->arg(i) + "\n";
  }

  request->send(404, "text/plain", message);
  digitalWrite(led, 0);
}

String out;

void drawGraph(AsyncWebServerRequest *request)
{
  out.reserve(STRING_SIZE);
  char temp[70];

  out = String();

  out += "<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" width=\"1810\" height=\"150\">\n";
  out += "<rect width=\"1810\" height=\"150\" fill=\"rgb(250, 230, 210)\" stroke-width=\"2\" stroke=\"rgb(0, 0, 0)\" />\n";
  out += "<g stroke=\"blue\">\n";
  int y = rand() % 130;

  for (int x = 10; x < 5000; x += 10)
  {
    int y2 = rand() % 130;
    sprintf(temp, "<line x1=\"%d\" y1=\"%d\" x2=\"%d\" y2=\"%d\" stroke-width=\"2\" />\n", x, 140 - y, x + 10, 140 - y2);
    out += temp;
    y = y2;
  }

  out += "</g>\n</svg>\n";

  LOGDEBUG1("Total length to send in chunks =", out.length());

  AsyncWebServerResponse *response = request->beginChunkedResponse("image/svg+xml", [](uint8_t *buffer, size_t maxLen,
                                                                                       size_t filledLength) -> size_t
  {
    size_t len = min(maxLen, out.length() - filledLength);
    memcpy(buffer, out.c_str() + filledLength, len);

    LOGDEBUG1("Bytes sent in chunk =", len);

    return len;
  });

  request->send(response);
}


void setup()
{
  pinMode(led, OUTPUT);
  digitalWrite(led, 0);

  Serial.begin(115200);

  while (!Serial && millis() < 5000);

  delay(200);

  Serial.print("\nStart Async_AdvancedWebServer_SendChunked on ");
  Serial.print(BOARD_NAME);
  Serial.print(" with ");
  Serial.println(SHIELD_TYPE);
  Serial.println(ASYNC_WEBSERVER_TEENSY41_VERSION);

  ///////////////////////////////////

  delay(500);

#if USING_DHCP
  // Start the Ethernet connection, using DHCP
  Serial.print("Initialize Ethernet using DHCP => ");
  Ethernet.begin();
#else
  // Start the Ethernet connection, using static IP
  Serial.print("Initialize Ethernet using static IP => ");
  Ethernet.begin(myIP, myNetmask, myGW);
  Ethernet.setDNSServerIP(mydnsServer);
#endif

  if (!Ethernet.waitForLocalIP(5000))
  {
    Serial.println(F("Failed to configure Ethernet"));

    if (!Ethernet.linkStatus())
    {
      Serial.println(F("Ethernet cable is not connected."));
    }

    // Stay here forever
    while (true)
    {
      delay(1);
    }
  }
  else
  {
    Serial.print(F("Connected! IP address:"));
    Serial.println(Ethernet.localIP());
  }

#if USING_DHCP
  delay(1000);
#else
  delay(2000);
#endif

  ///////////////////////////////////

  server.on("/", HTTP_GET, [](AsyncWebServerRequest * request)
  {
    handleRoot(request);
  });

  server.on("/test.svg", HTTP_GET, [](AsyncWebServerRequest * request)
  {
    drawGraph(request);
  });

  server.on("/inline", [](AsyncWebServerRequest * request)
  {
    request->send(200, "text/plain", "This works as well");
  });

  server.onNotFound(handleNotFound);

  server.begin();

  Serial.print(F("AsyncWebServer is @ IP : "));
  Serial.println(Ethernet.localIP());
}

void heartBeatPrint()
{
  static int num = 1;

  Serial.print(F("."));

  if (num == 80)
  {
    Serial.println();
    num = 1;
  }
  else if (num++ % 10 == 0)
  {
    Serial.print(F(" "));
  }
}

void check_status()
{
  static unsigned long checkstatus_timeout = 0;

#define STATUS_CHECK_INTERVAL     10000L

  // Send status report every STATUS_REPORT_INTERVAL (60) seconds: we don't need to send updates frequently if there is no status change.
  if ((millis() > checkstatus_timeout) || (checkstatus_timeout == 0))
  {
    heartBeatPrint();
    checkstatus_timeout = millis() + STATUS_CHECK_INTERVAL;
  }
}

void loop()
{
  check_status();
}
 
Last edited:
Note that this web server library doesn’t really use QNEthernet for its operation. It only uses the initialization and the included lwIP stack code.
Do you think I should go with a socket-based approach, if it comes down to it? I'm going to be using JSON for sure, but there's no real reason why I need to support a browser. It's just a convenient development tool.
 
@SmittyWerben#1 - had to get : https://github.com/khoih-prog/AsyncFSWebServer_Teensy41

must not be as .h is wrong


Opps - it takes BOTH of those ... and a new version of: https://github.com/ssilverman/QNEthernet

And I get this warning:
Code:
"C:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_DUAL_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\TEMP\\arduino\\sketches\\72279342B5FAB298C9807140C69BDBE9/pch" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0\\cores\\teensy4" "-It:\\T_Drive\\tCode\\libraries\\QNEthernet\\src" "-It:\\T_Drive\\tCode\\libraries\\AsyncWebServer_Teensy41-main\\src" "-It:\\T_Drive\\tCode\\libraries\\Teensy41_AsyncTCP-main\\src" "T:\\TEMP\\arduino\\sketches\\72279342B5FAB298C9807140C69BDBE9\\sketch\\AsyncWebServer.ino.cpp" -o "T:\\TEMP\\arduino\\sketches\\72279342B5FAB298C9807140C69BDBE9\\sketch\\AsyncWebServer.ino.cpp.o"
T:\T_Drive\tCode\ethernet\AsyncWebServer\AsyncWebServer.ino:52:4: warning: #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error [-Wcpp]
   52 |   #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error
      |    ^~~~~~~
 
And now getting to browser after FedEx delivery:

from : http://192.168.0.89/linline
Code:
File Not Found

URI: /linline
Method: GET
Arguments: 0

Doing a RePower restart on Teensy the Power shell's run and the same appears.

Restart again with 2nd PShell stopped the same appears?

That was EDGE and using BRAVE browser similar content but this header marker:
1709674909140.png
 
Checking source it responds to :
INLINE - above typed was somehow erroneously copy pasted as Linline :(

Then hitting refresh in browser causes this in the one PShell:
Code:
This works as well
Invoke-WebRequest : The server committed a protocol violation. Section=ResponseStatusLine
At line:2 char:7
+      (Invoke-WebRequest -Uri "http://192.168.0.89/inline" -Method Get ...
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

This works as well

<edit>: ABOVE shows it recovering - did repeat slower refresh and it failed to recover until another browser refresh was done
 
Last edited:
@SmittyWerben#1 - had to get : https://github.com/khoih-prog/AsyncFSWebServer_Teensy41

must not be as .h is wrong


Opps - it takes BOTH of those ... and a new version of: https://github.com/ssilverman/QNEthernet

And I get this warning:
Code:
"C:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\teensy\\tools\\teensy-compile\\11.3.1/arm/bin/arm-none-eabi-g++" -c -O2 -g -Wall -ffunction-sections -fdata-sections -nostdlib -MMD -std=gnu++17 -fno-exceptions -fpermissive -fno-rtti -fno-threadsafe-statics -felide-constructors -Wno-error=narrowing -mthumb -mcpu=cortex-m7 -mfloat-abi=hard -mfpu=fpv5-d16 -D__IMXRT1062__ -DTEENSYDUINO=159 -DARDUINO=10607 -DARDUINO_TEENSY41 -DF_CPU=600000000 -DUSB_DUAL_SERIAL -DLAYOUT_US_ENGLISH "-IT:\\TEMP\\arduino\\sketches\\72279342B5FAB298C9807140C69BDBE9/pch" "-IC:\\Users\\xxx\\AppData\\Local\\Arduino15\\packages\\teensy\\hardware\\avr\\1.59.0\\cores\\teensy4" "-It:\\T_Drive\\tCode\\libraries\\QNEthernet\\src" "-It:\\T_Drive\\tCode\\libraries\\AsyncWebServer_Teensy41-main\\src" "-It:\\T_Drive\\tCode\\libraries\\Teensy41_AsyncTCP-main\\src" "T:\\TEMP\\arduino\\sketches\\72279342B5FAB298C9807140C69BDBE9\\sketch\\AsyncWebServer.ino.cpp" -o "T:\\TEMP\\arduino\\sketches\\72279342B5FAB298C9807140C69BDBE9\\sketch\\AsyncWebServer.ino.cpp.o"
T:\T_Drive\tCode\ethernet\AsyncWebServer\AsyncWebServer.ino:52:4: warning: #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error [-Wcpp]
   52 |   #warning Using QNEthernet lib for Teensy 4.1. Must also use Teensy Packages Patch or error
      |    ^~~~~~~

Yes, I looked at that warning and the author says if your program works, then don't worry about the warning: https://forum.pjrc.com/index.php?threads/websockets_generic-library.61149/post-302109

That's a little odd, mine looked like this

1709680468326.png
 
Checking source it responds to :
INLINE - above typed was somehow erroneously copy pasted as Linline :(

Then hitting refresh in browser causes this in the one PShell:
Code:
This works as well
Invoke-WebRequest : The server committed a protocol violation. Section=ResponseStatusLine
At line:2 char:7
+      (Invoke-WebRequest -Uri "http://192.168.0.89/inline" -Method Get ...
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-WebRequest], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeWebRequestCommand

This works as well

<edit>: ABOVE shows it recovering - did repeat slower refresh and it failed to recover until another browser refresh was done
Sorry about the 'linline' typo.

So it sounds like you reproduced it. I noticed the slower update rate just now, too..

This is a vigorous test to demonstrate a rare but troubling problem with my system.

What do you think I should do? pivot to websockets?
 
That's a little odd, mine looked like this
Does seem different for sure - But with web refresh it seemed line

I made this change/addition - seems to have stopped a twin message collision? But maybe that is the point of the problem?
Code:
  server.on("/inline", [](AsyncWebServerRequest * request)
  {
    request->send(200, "text/plain", "This works as well");
  });

  server.on("/inlineB", [](AsyncWebServerRequest * request)
  {
    request->send(200, "text/plain", "This works as well B");
  });

Then running:
and - WITH "B" > inlineB
Code:
while($true) {
     (Invoke-WebRequest -Uri "http://192.168.0.89/inlineB" -Method Get -UseBasicParsing).Content
     Start-Sleep -Milliseconds 500
 }
and
Code:
while($true) {
     (Invoke-WebRequest -Uri "http://192.168.0.89/" -Method Get -UseBasicParsing).Content
     Start-Sleep -Milliseconds 500
 }
 
Unfortunately, there’s no great non-commercial web server library that I could find. I use the basic Arduino-style API provided by QNEthernet for my servers.
 
Does seem different for sure - But with web refresh it seemed line

I made this change/addition - seems to have stopped a twin message collision? But maybe that is the point of the problem?
Code:
  server.on("/inline", [](AsyncWebServerRequest * request)
  {
    request->send(200, "text/plain", "This works as well");
  });

  server.on("/inlineB", [](AsyncWebServerRequest * request)
  {
    request->send(200, "text/plain", "This works as well B");
  });

Then running:
and - WITH "B" > inlineB
Code:
while($true) {
     (Invoke-WebRequest -Uri "http://192.168.0.89/inlineB" -Method Get -UseBasicParsing).Content
     Start-Sleep -Milliseconds 500
 }
and
Code:
while($true) {
     (Invoke-WebRequest -Uri "http://192.168.0.89/" -Method Get -UseBasicParsing).Content
     Start-Sleep -Milliseconds 500
 }


Then did you bang on either of those URLs with a browser? Did it generate failures as before?

My problem isn't really about hitting the same address (IP/inline) from multiple sources, but rather it seems simultaneous transactions (that's my guess, something like overlapping requests) of any kind can lead to the firmware getting bunched up.

Unfortunately, there’s no great non-commercial web server library that I could find. I use the basic Arduino-style API provided by QNEthernet for my servers.

Let's open it to commercial then: who do you like if money is not a problem object and we're talking about Teensy4.1?
 
Then did you bang on either of those URLs with a browser? Did it generate failures as before?

My problem isn't really about hitting the same address (IP/inline) from multiple sources, but rather it seems simultaneous transactions (that's my guess, something like overlapping requests) of any kind can lead to the firmware getting bunched up.
My guess was the WEB refresh was overlapping during/before the same 'inline' request from the PShell request.

Putting the inlineB path in the code seemed to resolve the issue - as each of the two requesters would only send one at a time, so didn't go much after that ... either that was the problem that overlaps should work (and don't seem to) - or overlaps can happen and cause trouble ...

Either they need to be prevented - or code revised to resolve only one at a time - or safely resolve two.
 
Let's open it to commercial then: who do you like if money is not a problem object and we're talking about Teensy4.1?
First check out the ServerWithListeners example in the library. That’s the beginnings of one way to write a server that can track multiple clients. (There are other ways too.) I’m happy to chat with you off-list, too, if you send me a message.
 
My guess was the WEB refresh was overlapping during/before the same 'inline' request from the PShell request.

Putting the inlineB path in the code seemed to resolve the issue - as each of the two requesters would only send one at a time, so didn't go much after that ... either that was the problem that overlaps should work (and don't seem to) - or overlaps can happen and cause trouble ...

Either they need to be prevented - or code revised to resolve only one at a time - or safely resolve two.

Is there any chance we might hear from the author of this code? I think he's around in these forums.
 
Back
Top