ArduinoMongoose icon indicating copy to clipboard operation
ArduinoMongoose copied to clipboard

ESP32 Connection reset by peer on multiple async calls

Open johnnytolengo opened this issue 1 year ago • 4 comments

My env:

- ESP32 with PSRam
- [email protected]
- platformio
- Testing repo: https://git.quark-i.com/public/esp32ArduinoMongoose
-  Purpose: Serve static files from LittleFs for a Web

I am thinking in to move from ESPAsyncWebServer to this ArduinoMongoose Lib because of the nasty and uncontrollable crashes of the ESPAsyncWebServer. Before to do that I must be sure that ArduinoMongoose will be a good option, at my first try I got an issue: on 10 simulataneous calls 3 calls are rejected by the Mongoose, that's not randomly, always it gives the same result call 8,9 and 10 refused:

image

Do you have any idea why is that happening?

I create a small python3 script "requestTest.py" in order to create that situation, 10 async GET calls.

johnnytolengo avatar Jan 25 '24 09:01 johnnytolengo

I recommend Psychichttp which is based on the native IDF server and has an almost 100% identical syntax like AsyncTcp. I had zero crash with it so far and handles everything just like Asynctcp and more.

zekageri avatar Jan 25 '24 10:01 zekageri

@zekageri I will do a try right now, looks very promising

johnnytolengo avatar Jan 25 '24 11:01 johnnytolengo

@zekageri you save my week, the Psychichttp is really psycho! I attack the ESP with multiple calls and zero crashes, zero errors, zero lost. Thank you so much!

johnnytolengo avatar Jan 25 '24 12:01 johnnytolengo

Yeah, pretty sick

zekageri avatar Jan 25 '24 13:01 zekageri