Current Lua downloadable firmware will be posted here

User avatar
By kwis2
#52795
devsaurus wrote:In any case, it might be that the loop prevents the watchdog timer from being serviced. If it's running for more than 5 seconds, then the ESP will be reset by WDT.


The code run as event by timer every 1 second and there were no loop, and in code there is protection to not run second instance of program.
Code: Select allif singleLua~=0 then
    singleLua=singleLua+1
    if singleLua>3 then
        singleLua=0
    end
    print(singleLua.." meas ")
    return
end

The longest time to service code it was no more than 2 timers (2 seconds) and even with timeout there were no another timers. It mean that whole chip slowed down.
User avatar
By devsaurus
#52835 I've took your code and saved to to testcase_spiffs_big.lua. Then executed this script over and over again until:

Code: Select all> dofile("testcase_spiffs_big.lua")
Total : 397082 bytes
Used  : 378006 bytes
Remain: 19076 bytes

curr file 375 file to del 76
awyn376.dat
301
> dofile("testcase_spiffs_big.lua")
Total : 397082 bytes
Used  : 378006 bytes
Remain: 19076 bytes

curr file 376 file to del 77
awyn377.dat
301
> dofile("testcase_spiffs_big.lua")
Total : 397082 bytes
Used  : 378006 bytes
Remain: 19076 bytes

curr file 377 file to del 78

At this point execution got slower and slower as you described.

I suspect that it's related to the large number of files and SPIFFS takes a lot of time to search for free slots. But, it seems to hang afterwards and that's bad.

Please open an issue at https://github.com/nodemcu/nodemcu-firmware/issues with a detailed description and full code to reproduce this problem. Let's see if anything can be done about it.