-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Concurrent requests #19
Comments
Duplicates #1 If anyone has some spare cycles to test, contact me. I have some thoughts about how to try. |
Hello, How can I help? Best regards, |
Basically with debugging. I have tried the following: In ESP (^E, paste, ^D):
On client side (paste into ping.py and make executable):
The server crashes pretty quickly with just two clients running. I have not been able to get any information about why the ESP is crashing -- and rebooting in the process. Will try |
Sample output:
|
Ok... so my first test (second test I will do later) was made on:
and.. six parallel clients run for 10 minutes - everything works just fine, no errors or crashes. Now is time for ESP32 |
Hello, next part of tests, this time on ESP32.
and... 10 parallel clients run form 10 minutes - everything works just fine, no errors or crashes. So form me... can't reproduce this error... in some free time I will test it on ESP8266. Best regards, |
And... I can confirm! On ESP8266 the error/crash could be reproduced. Only one client can work at time. Second will crash system. Hardware:
So the error is esp8266 specified or to microptyhon version. Best regards, |
Excellent thanks for that @mvincm. Still building my ESP32 kit! We’re you testing above code? |
Yeep, I have used yours code form here: issuecomment-357841782 |
Hello ! Any news? ;) |
Hello, Any news after one year? ;) M |
Sorry, no :( I have been focused the ESP32, and my time is pretty limited to work on Micropython on the ESP8266. My guess is that there is something fundamental and underlying in either my code, the Micropython code, or the underlying SDK, that is causing issues with concurrent access. Of course, my personal recommendation is to use Erlang. I have been pretty active in the https://github.com/bettio/AtomVM project, which brings the elegant and beautiful world of Erlang to the ESP community. Python and concurrency? Abandon hope, all ye who enter here! |
Ok, I can understand your situation. I start to write my own http server (as simple as possible but more complex than original micropython example). BTW... At least Chrome after first request block socket for the future request but do not send anything and these cause problems on micropython http server. It locks socket till timeout (using "uselect.poll" is some solution for single thread http server). |
Hi, I'm using uhttpd as a REST server for embedded systems.
I'm planning to use it as a REST server for data centers.
I need to handle concurrent requests or repetitive requests in a second.
I found that the server just knocked down(quited) when the concurrent requests was more than two.
How could I resolve this problem?
Thanks for your great work !!
The text was updated successfully, but these errors were encountered: