You are reading a single comment by @Jurand and its replies. Click here to read the full conversation.
  • I had similar problem:

    Execution Interrupted during event processing.
    New interpreter error: MEMORY
    ERROR: Ctrl-C while processing interval - removing it.
    Execution Interrupted during event processing.
    New interpreter error: CALLBACK
    

    I send DHT22 sensor data to backend endpoint every second using http post requests.
    I think I needed 7+-20 of them to show up to cause it this to happen.

    Extending setInterval() from 1000 to 5000 did work.

    I think the memory stores the http request until it receives callback or expires at some point, and sending too many in the same time causes CALLBACK MEMORY to run out of storage space :)

    You need to find the right interval time so that the "callback memory" stack had data flow instead eventually run out of space.

    http request connects to server, closes connection, waits for the response, and when it receives one, the whole thing ends and memory stack is being free from this http request, so in the meantime memory stores the request.

    If you sent 50 requests and none gets response, you have 50 requests waiting for responses which causes memory run out of space to store more.

    If you need the data immediately, please consider web sockets instead of http requests.

    web socket opens connection and never closes it, in the meantime data flows non stop. it is used for chats but any other use when data flow is needed and considerably web socket would use less data transfer than http request is a good choice.

About

Avatar for Jurand @Jurand started