• Out of interest: were you using the IDE, or something else?

    Wow, yeah - that's loads of free memory. I've just been looking at this, and it seems that the out of memory error occurs inside the receive handler - so basically the ESP8266 is pushing data into Espruino and it's not able to handle it fast enough so it ends up getting buffered in the ESP8266 driver.

    I guess you'd figured that out with your work with adding flow control anyway?

    You could try to increase the chunk size to 2048, and see if that fixes it? Also, if it's possible to increase the IO speed to the SD card I'm sure that'd help a huge amount.

    It's a bit difficult to work around really - the new Espruino builds will do proper flow control with ESP8266 but that's only at the low-level side. There would have to be something else added that'd push back from further inside the networking layers as well.

    Possibly another option might be for me to add a way to give priority to piping that is done from sockets - but I don't think that's what is happening in this case - I think the Espruino is busy enough that the data isn't even getting out of the ESP8266 driver into the networking layer.

About

Avatar for Gordon @Gordon started