1
votes

I have sucessfully setup NodeMCU version 3.0.0.0 on a ESP-01s and connected to my wifi.

Now I tried to setup an httpserver using the nodemcu httpserver module

Added a simple request handler with printing the heap size ...

httpserver = require("httpserver").createServer(80, function(req, res)

    print("+R", req.method, req.url, node.heap())

    res:finish("Hello, world!")

end)

After some requests there is an out of mem

NodeMCU 3.0.0.0 
        branch: master
        commit: 310faf7fcc9130a296f7f17021d48c6d717f5fb6
        release: 3.0-master_20190907
        release DTS: 201909070945
        SSL: false
        build type: float
        LFS: 0x0
        modules: encoder,file,http,i2c,net,node,tmr,uart,wifi
build 2019-12-26 16:24 powered by Lua 5.1.4 on SDK 3.0.1-dev(fce080e)
Connecting to WiFi access point...
> Connection to AP(UniFi2) established!
Waiting for IP address...
Wifi connection is ready! IP address is: 192.168.40.243
Startup will resume momentarily, you have 3 seconds to abort.
Waiting...
Running
+R      GET     /       19008
+R      GET     /       18368
+R      GET     /       17712
+R      GET     /       16912
+R      GET     /       16344
+R      GET     /       15648
+R      GET     /       14992
+R      GET     /       14320
+R      GET     /       13832
+R      GET     /       13232
+R      GET     /       12544
+R      GET     /       12128
+R      GET     /       11424
+R      GET     /       10992
+R      GET     /       10464
+R      GET     /       10016
+R      GET     /       9736
+R      GET     /       9296
+R      GET     /       8816
+R      GET     /       8520
+R      GET     /       8096
+R      GET     /       7624
+R      GET     /       7192
+R      GET     /       6696
+R      GET     /       6248
+R      GET     /       5736
+R      GET     /       2136
+R      GET     /       2656
E:M 1592
PANIC: unprotected error in call to Lua API (fifosock.lua:33: out of memory)

I have also tried sending a header "Connection: close" to instruct the client to finish the connection and not trying to (Request-Header) "Connection: keep-alive"

Any ideas?

1
Any more feedback required here? - Marcel Stör
sry I have switched to arduino library - Pascal

1 Answers

0
votes

Sorry to say but this is a known issue. PR https://github.com/nodemcu/nodemcu-firmware/pull/2791 should fix it. It would be fantastic if you could help test the proposed changes and report your findings back there.