Comments (6)
I think you find you're just out of memory.
That's why I introduced the limitation, to make multiple connections queue sequentially.
For the lws test server, it opens 4 ws connections and the limit must be 4. But for a more typical situation with less ws connections 3 should be enough.
You can turn up mbedtls and / or openssl emulation debug level in sdkconfig to get more info.
from lws-esp32-factory.
Yes it is a memory problem on my side.
I used just the lws-factory-app for testing multiple connections.
The debug infos did not really help me for this, but I let them turned on for now.
One problem that I found on lws-side is probably a small memory leak. I put a heap output in the main loop:
while (!lws_service(context, 10)) {
taskYIELD();
printf("free heap: %d\n", xPortGetFreeHeapSize());
}
and connected and disconnected one client sequentially for multiple times. The outputs I got (memory after disconnect):
168828
166944
166332
166232
166132
166032
As it seems there are 100 Bytes which are not freed (after the 3rd disconnect). Even not if I let the program run longer.
from lws-esp32-factory.
It's a bit difficult to use this information to point the finger. After lws starts in factory, there will be various allocations (larger than 100 bytes) for context, vhost and per-vhost protocol that won't get returned, so I assume your starting point is after this.
But generally per-connection stuff is definitely handled well in lws, since we check it via valgrind on Linux, where it is completely clean.
If it's 100 bytes per connection, or otherwise grows, somebody should take care about it (dunno how though, there are no tools afaik). If it's 100 bytes, always one time, well...
from lws-esp32-factory.
Ok at some point it stabilizes, so its ok!
from lws-esp32-factory.
+/- 100 bytes is not worth my time to try to track it down. LWS itself is known to not have this problem.
100 bytes per connection, or 100 bytes per second ^^ would be bad for me too.
But 100 bytes one time, is something for contributors to send fixes for... right?
from lws-esp32-factory.
Yes it is only a few times the until the 3rd or 4th connection attempt, then it is stable on the same level of memory usage. So it is no problem.
Yeah, but I have to get other things done as well ;-)
Thanks for your great support anyway!
from lws-esp32-factory.
Related Issues (20)
- lws-esp32-factory/components/bootloader/Makefile.projbuild:37: *** multiple target patterns. Stop. HOT 3
- oto_choose_part will accept partition outside range HOT 2
- INFO: ota update of factory partition fails HOT 8
- lws-esp32-factory is always listed as dirty HOT 4
- Does it link on ESP32 HOT 2
- Connection terminates after approximetly 10 minutes HOT 3
- Minor: Missing "hard" for Git command in Readme HOT 1
- Lets Encrypt stops at first step
- tcp_connect: can only connect from state CLOSED
- Partition table too small for newer esp-idf HOT 4
- how to force enter app after first reboot HOT 7
- Updated alignment with esp-idf/mbedtls needed to build with latest esp-idf HOT 16
- websocket client example
- Error during make flash monitor HOT 2
- mbedtls_handshake: ssl ret -6900 state 8
- arduino-esp32 support ?
- multiple definition of api functions when using openssl api functions HOT 1
- build fail for lws-esp32-factory HOT 12
- Can this be used on esp8266 HOT 1
- Please give me an esp8266 program about LWS HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lws-esp32-factory.