-
• #2
What is the error output your are seeing?
What is the output of
process.env
?The will show the free jsvars after the load.
If you use the
save on send
option in the ide settings, the code will be stored in flash rather than ram and you might not run out of space then. -
• #3
in error output i see:
sometime this:
ERROR: Error processing Serial data handler - removing it.
ERROR: Error processing Serial data handler - removing it.
Execution Interrupted during event processing.
New interpreter error: CALLBACK,MEMORYsometime this:
ERROR: Ctrl-C while processing interval - removing it.
Execution Interrupted during event processing.
Uncaught InternalError: Unable to create socket
at line 130 col 10
}).end();^
in function "getTimeOnline" called from line 103 col 21
try { getTimeOnline(); } catch (error) { }process.env:
"VERSION": "1v99",
"GIT_COMMIT": "f0d66ba",
"BOARD": "ESP8266_4MB",
"FLASH": 0, "RAM": 81920,
"SERIAL": "5ccf7fed-7f68",
"CONSOLE": "Telnet",
"MODULES": "Flash,Storage,net" ... "r,crypto,neopixel",
"EXPTR": 1073643636 } -
• #4
ohh -0nce a second you are going to the internet to update the time?
Instead do that a lot less frequently - say once an hour - and then set the internal clock to the time, and use the internal clock as your time reference.
What is probably happening is a new call to get the time is made, when the last has not finished.
-
• #5
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.
Hi gyes. Recently write code of internet online clock. But my happiness was not long, because i had unresolved trouble for me. All of operativ memory for some time is went out, and code is stopping. Where could I make a mistake and how to fix it?
p.s Intervals of lost all memory every time is different.
all code: